Skip to content

Commit

Permalink
chore: change workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BO-LIKE-CHICKEN committed Jul 15, 2024
1 parent 5f2014f commit b74c6ab
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
with:
node-version: "20"

- name: Install jq
run: sudo apt-get install -y jq

- name: Install pnpm
run: |
npm install -g pnpm
Expand All @@ -37,14 +34,16 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Update version in package.json
if: github.ref_type == 'branch'
run: |
jq --arg build "$GITHUB_RUN_NUMBER" --arg commit "${GITHUB_SHA::8}" \
'.version = .version + "-dev." + $build + "+" + $commit' package.json > package.json.tmp
mv package.json.tmp package.json
- name: Release
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run release

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: release-branch
commit-message: "chore: create release PR"
title: "Release PR"
body: "This PR is automatically generated by semantic-release."

0 comments on commit b74c6ab

Please sign in to comment.