diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index acd79d8..6f0882f 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -3,7 +3,11 @@ name: Build, Package, Release [dev] on: push: branches: - - delevop + - develop + +permissions: + contents: write + pull-requests: write jobs: build: @@ -26,22 +30,41 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.MO_CLI_TOKEN }} - - name: Create Sematic Release Version - run: | - git config --global user.email "ruediger@pretzlaff.info" - git config --global user.name "ruedigerp" - git config --global credential.helper cache - npx standard-version --prerelease dev - git push --follow-tags origin delevop + # - name: Create Sematic Release Version + # run: | + # git config --global user.email "ruediger@pretzlaff.info" + # git config --global user.name "ruedigerp" + # git config --global credential.helper cache + # npx standard-version --prerelease dev + # git push --follow-tags origin delevop + + - name: release-please + uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.MO_CLI_TOKEN }} + release-type: simple + target-branch: ${{ github.ref_name }} + + - name: Fetch latest tags + run: git fetch --tags + + - name: Get latest version tag + id: get_tag + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV + + # - name: Debug Outputs + # run: | + # echo "Outputs: ${{ toJson(steps.release.outputs) }}" - - name: Get the current version - id: get_version - run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV + # - name: Get the current version + # id: get_version + # run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV - name: Create release in another repo run: | - echo "Creating release ${VERSION}" - gh release create refs/tags/${VERSION} --title "Release ${VERSION}" --repo ruedigerp/homebrew-dns-manager + echo "Creating release ${tag}" + gh release create refs/tags/${tag} --title "Release ${tag}" --repo ruedigerp/homebrew-dns-manager env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} @@ -59,9 +82,9 @@ jobs: run: | ls -lisa builds for tarball in builds/*.tar.gz; do - gh release upload "${{ env.VERSION }}" "$tarball" --repo ruedigerp/homebrew-dns-manager-dev + gh release upload "${tag}" "$tarball" --repo ruedigerp/homebrew-dns-manager-dev done - gh release upload "${{ env.VERSION }}" "builds/dns-manager-dev-${{ env.VERSION }}-windows-amd64" --repo ruedigerp/homebrew-dns-manager-dev + gh release upload "${tag}" "builds/dns-manager-dev-${tag}-windows-amd64" --repo ruedigerp/homebrew-dns-manager-dev env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} @@ -77,7 +100,7 @@ jobs: cp ../dns-manager-dev.json . cp ../CHANGELOG.md . git add . - git commit -m " ${{ env.VERSION }}" + git commit -m " ${tag}" git push env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 832220e..d0eb87d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,22 +26,49 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.MO_CLI_TOKEN }} - - name: Create Sematic Release Version - run: | - git config --global user.email "ruediger@pretzlaff.info" - git config --global user.name "dns-manager" - git config --global credential.helper cache - npx standard-version - git push --follow-tags origin main + # - name: Create Sematic Release Version + # run: | + # git config --global user.email "ruediger@pretzlaff.info" + # git config --global user.name "dns-manager" + # git config --global credential.helper cache + # npx standard-version + # git push --follow-tags origin main + + # - name: release-please + # uses: googleapis/release-please-action@v4 + # with: + # # this assumes that you have created a personal access token + # # (PAT) and configured it as a GitHub action secret named + # # `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important). + # token: ${{ secrets.MO_CLI_TOKEN }} + # # this is a built-in strategy in release-please, see "Action Inputs" + # # for more options + # release-type: simple + # target-branch: ${{ github.ref_name }} + + # - name: Get the current version + # id: get_version + # run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV + + - name: release-please + uses: googleapis/release-please-action@v4 + id: release + with: + token: ${{ secrets.MO_CLI_TOKEN }} + release-type: simple + target-branch: ${{ github.ref_name }} - - name: Get the current version - id: get_version - run: echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV + - name: Fetch latest tags + run: git fetch --tags + + - name: Get latest version tag + id: get_tag + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV - name: Create release in another repo run: | - echo "Creating release ${VERSION}" - gh release create refs/tags/${VERSION} --title "Release ${VERSION}" --repo ruedigerp/homebrew-dns-manager + echo "Creating release ${tag}" + gh release create refs/tags/${tag} --title "Release ${tag}" --repo ruedigerp/homebrew-dns-manager env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} @@ -73,9 +100,9 @@ jobs: ls -lisa builds for tarball in builds/*.tar.gz; do echo "Tarball: $tarball" - gh release upload "${{ env.VERSION }}" "$tarball" --repo ruedigerp/homebrew-dns-manager + gh release upload "${tag}" "$tarball" --repo ruedigerp/homebrew-dns-manager done - gh release upload "${{ env.VERSION }}" "builds/dns-manager-${{ env.VERSION }}-windows-amd64" --repo ruedigerp/homebrew-dns-manager + gh release upload "${tag}" "builds/dns-manager-${tag}-windows-amd64" --repo ruedigerp/homebrew-dns-manager env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} @@ -91,7 +118,7 @@ jobs: cp ../dns-manager.json . cp ../CHANGELOG.md . git add . - git commit -m " ${{ env.VERSION }}" + git commit -m " ${tag}" git push env: GH_TOKEN: ${{ secrets.MO_CLI_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af9b3e..0029628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + ### [1.0.22](https://github.com/ruedigerp/dns-manager/compare/v1.0.21...v1.0.22) (2024-11-23) @@ -14,8 +15,10 @@ All notable changes to this project will be documented in this file. See [standa ### [1.0.20](https://github.com/ruedigerp/dns-manager/compare/v1.0.19...v1.0.20) (2024-11-22) + ### Bug Fixes + * add comments to cloudflare records ([8580514](https://github.com/ruedigerp/dns-manager/commit/8580514c04f672e9ccc66d0fed9404a407575169)) ### [1.0.19](https://github.com/ruedigerp/dns-manager/compare/v1.0.18...v1.0.19) (2024-11-20) diff --git a/README.md b/README.md index 11073ee..d72ae9e 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,4 @@ Batch Command Options • zone: Only required for Bind configurations to specify the zone. • proxied: Only used for Cloudflare to enable or disable proxying. +