Skip to content

Commit

Permalink
ci: Automate setting electron app version based on the tag (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
aomafarag authored Mar 7, 2023
1 parent 6887469 commit f3a5969
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-electron-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ jobs:
with:
node-version: 16.9.1

- name: Get version from tag
id: get_version
uses: actions/github-script@v6
with:
script: |
const tag = context.ref
const version = tag.replace('refs/tags/v', '')
core.setOutput('version', version)
- name: Set version
run: cd electron && npm version ${{ steps.get_version.outputs.version }} --no-git-tag-version && cd ..

- name: Run electron-builder
uses: samuelmeuli/action-electron-builder@e4b12cd06ddf023422f1ac4e39632bd76f6e6928
with:
Expand Down

0 comments on commit f3a5969

Please sign in to comment.