From 82167437bc39e040055cb93d9fbc27a43e21212c Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Sat, 6 Jan 2024 11:57:20 +0100 Subject: [PATCH 1/2] feat: :construction_worker: (#432) add creation of major/minor tags --- .github/workflows/release_please.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_please.yml b/.github/workflows/release_please.yml index 67ad13f8..939642aa 100644 --- a/.github/workflows/release_please.yml +++ b/.github/workflows/release_please.yml @@ -9,6 +9,7 @@ on: tag_name: description: "The tag name" value: ${{ jobs.release_please.outputs.tag_name }} + workflow_dispatch: permissions: @@ -19,10 +20,25 @@ jobs: release_please: runs-on: ubuntu-latest outputs: - release_created: ${{ steps.release_please.outputs.release_created }} - tag_name: ${{ steps.release_please.outputs.tag_name }} + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} steps: - uses: google-github-actions/release-please-action@v4 - id: release_please + id: release with: release-type: simple + - uses: actions/checkout@v4 + - name: tag major and minor versions + if: ${{ steps.release.outputs.release_created }} + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" + git tag -d v${{ steps.release.outputs.major }} || true + git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git push origin :v${{ steps.release.outputs.major }} || true + git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true + git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" + git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" + git push origin v${{ steps.release.outputs.major }} + git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} From 5523130e11a6b4533ba54c695d069f8e8e9dcb24 Mon Sep 17 00:00:00 2001 From: Andy Augustin Date: Sat, 6 Jan 2024 12:01:01 +0100 Subject: [PATCH 2/2] docs: :memo: (#432) updte documentation --- .github/workflows/actions_template_sync.yml | 2 +- README.md | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/actions_template_sync.yml b/.github/workflows/actions_template_sync.yml index aba286df..1ae97ce1 100644 --- a/.github/workflows/actions_template_sync.yml +++ b/.github/workflows/actions_template_sync.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1.1.9 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: AndreasAugustin/template diff --git a/README.md b/README.md index 3ee9c70d..02ecd97c 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ jobs: # submodules: true - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1.1.9 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: @@ -134,7 +134,7 @@ jobs: token: ${{ steps.generate_token.outputs.token }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1.1.9 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ steps.generate_token.outputs.token }} source_repo_path: @@ -170,7 +170,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1.1.9 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # , should be within secrets @@ -224,7 +224,7 @@ jobs: token: ${{ secrets.CUSTOM_GITHUB_PAT }} - name: Test action step PAT - uses: AndreasAugustin/actions-template-sync@v1.1.9 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.CUSTOM_GITHUB_PAT }} source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # , should be within secrets @@ -371,7 +371,7 @@ hooks: token: ${{ secrets. }} - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v1.1.8 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: @@ -386,7 +386,7 @@ under the `Workflow permissions` section. ## Release Updates -* :warning: starting with version v1.0.0 the `upstream_branch` variable default is not `main` anymore. It is now set to the remote default branch. +* :warning: starting with version `v1` (`v1.0.0`) the `upstream_branch` variable default is not `main` anymore. It is now set to the remote default branch. * starting with version v0.5.2-draft the `templateversionrc` file is not needed anymore. You can delete that file from the target repositories. ## Debug