From 2277ec05d11e1f2fcba76d7a6320ab508ff26095 Mon Sep 17 00:00:00 2001 From: redatman Date: Wed, 17 Jul 2024 02:05:31 +0800 Subject: [PATCH] feat: Automate release creation and tagging Introduce a new workflow to automatically create releases and tags based on the `RELEASE_VERSION` environment variable. This workflow leverages the `latest-tag` and `bump-everywhere` actions to simplify the release process and ensure consistent versioning across all project components. --- .github/workflows/create-release.yaml | 30 ++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 1b37f03..30a88ab 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code + - name: Checkout repository uses: actions/checkout@v4 - name: Set up Git @@ -30,6 +30,34 @@ jobs: echo $RELEASE_VERSION echo ${{ steps.set_output.outputs.tag }} + - name: Run latest-tag + uses: EndBug/latest-tag@v1 + with: + description: This tag has been auto-generated by this action. + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + + + + - name: bump-everywhere + # You may pin to the exact commit or the version. + # uses: undergroundwires/bump-everywhere@5d9c038bc3ecc5648eadbf49ca6c66c6f67b0cf6 + uses: undergroundwires/bump-everywhere@1.4.0 + with: + # # Repository name with owner to bump & release. For example, undergroundwires/bump-everywhere + # repository: # optional, default is ${{ github.repository }} + # # Name of the user who will do the bump commit + # user: # optional, default is ${{ github.actor }} + # # Commit message that will be used in the bump commit + # commit-message: # optional, default is ⬆️ bump everywhere to {{version}} + # # Personal access token (PAT) used to clone & push to the repository. + git-token: ${{ secrets.ACTION_TOKEN }} # optional, default is ${{ github.token }} + # # The type of the GitHub release + # release-type: # optional, default is release + # # Personal access token (PAT) used to release to GitHub. + release-token: ${{ secrets.ACTION_TOKEN }} # optional, default is ${{ github.token }} + + - name: Debug information run: | git status