Skip to content

Commit

Permalink
ci: fix release workflow (#969)
Browse files Browse the repository at this point in the history
* fix(ci): add GitHub Actions workflow file on release branch
* ci(gh-actions): use light tag
* ci(gh-actions): compare to release branch
  • Loading branch information
nogic1008 committed May 5, 2024
1 parent 752eff1 commit 8510191
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/nodejs.yml
Expand Up @@ -112,17 +112,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.1.4
with:
ref: main
ref: ${{ vars.RELEASE_BRANCH }}
sparse-checkout: |
dist
- name: Use Node.js ${{ vars.NODE_VERSION }}
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ vars.NODE_VERSION }}
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Build Action Assets on main
run: npm run build
- name: Download Current Action Assets
uses: actions/download-artifact@v4.1.7
with:
Expand Down Expand Up @@ -177,6 +174,7 @@ jobs:
git restore --source=origin/main -- LICENSE
git restore --source=origin/main -- action.yml
git restore --source=origin/main -- images/*.png
git restore --source=origin/main -- .github/workflows/release.yml
- name: Download Build Assets
uses: actions/download-artifact@v4.1.7
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
release:
name: Release
name: Add Major & Minor Git Tag
if: github.event.release.prerelease == false
runs-on: ubuntu-latest
steps:
Expand All @@ -23,6 +23,6 @@ jobs:
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git tag -a ${{ steps.version.outputs.major }}
git tag -a ${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}
git tag ${{ steps.version.outputs.major }}
git tag ${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}
git push --tags --force

0 comments on commit 8510191

Please sign in to comment.