Skip to content

Commit

Permalink
feat: 👷 (#432) support major/minor tags (#433)
Browse files Browse the repository at this point in the history
* feat: 👷 (#432) add creation of major/minor tags

* docs: 📝 (#432) updte documentation
  • Loading branch information
AndreasAugustin committed Jan 6, 2024
1 parent 24d0c69 commit eb942cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions_template_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/release_please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
tag_name:
description: "The tag name"
value: ${{ jobs.release_please.outputs.tag_name }}

workflow_dispatch:

permissions:
Expand All @@ -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 }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <owner/repo>
Expand Down Expand Up @@ -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: <owner/repo>
Expand Down Expand Up @@ -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 }} # <owner/repo>, should be within secrets
Expand Down Expand Up @@ -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 }} # <owner/repo>, should be within secrets
Expand Down Expand Up @@ -371,7 +371,7 @@ hooks:
token: ${{ secrets.<secret_name> }}
- 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: <owner/repo>
Expand All @@ -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
Expand Down

0 comments on commit eb942cf

Please sign in to comment.