Skip to content

Commit

Permalink
build: bump version in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickDinh committed Mar 22, 2024
1 parent b6bea88 commit 4255eb3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,19 @@ jobs:
- name: get release ID
id: get-release-id
uses: actions/github-script@v7
if: steps.get-next-version.outputs.new-release-published == 'true'
with:
script: |
const { data } = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: "v${{steps.get-next-version.outputs.new-release-version}}"
tag: "v${{ steps.get-next-version.outputs.new-release-version }}"
})
return data.id
outputs:
release_id: ${{steps.get-release-id.outputs.result}}
release_published: ${{ steps.get-next-version.outputs.new-release-published }}
release_version: ${{ steps.get-next-version.outputs.new-release-version }}
release_id: ${{ steps.get-release-id.outputs.result }}

package-tauri:
needs:
Expand All @@ -90,6 +93,7 @@ jobs:
matrix:
platform: [macos-latest]
name: Package Tauri app
if: ${{ needs.create-release.outputs.release_published == 'true' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -110,14 +114,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: bump version in package.json
run: |
sed -i '' "s/$\"version\": \"0.0.0\"/$\"version\": \"${{ needs.create-release.outputs.release_version }}\"/g" "package.json"
- name: install app dependencies
run: npm install

- run: npx semantic-release --dry-run
id: get-next-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 4255eb3

Please sign in to comment.