Skip to content

Commit

Permalink
I think I got the versions down
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jan 14, 2024
1 parent de0ed54 commit 741a3a8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@ jobs:
node-version: 'lts/*'
cache: 'npm'

# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2

- name: Change package.json version to the tag version
id: info
uses: jaywcjlove/github-action-package@main
with:
version: ${{steps.get_version.outputs.version-without-v}}

- name: Install frontend dependencies
env:
VERSION: ${{steps.get_version.outputs.version-without-v}}
run: npm install

- name: Build the app
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"distDir": "../build"
},
"package": {
"productName": "pf2ools"
"productName": "pf2ools",
"version": "../package.json"
},
"tauri": {
"allowlist": {
Expand Down
7 changes: 7 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ const config = {
},

kit: {
version: {
// Not sure whether I should reverse the logic here.
// Currently we are using the version from the environment variable, which has to be set outside.
// This is meant to allow to have "no version" as per debug builds (next.pf2oo.ls) and "version" as per release builds
// But we might want to instead have the versions by default and build timestamp with a debug flag. But then this can cause issues in terms of what version is what.
name: process.env.VERSION ?? undefined,
},
adapter: adapter({
fallback: '404.html',
}),
Expand Down

0 comments on commit 741a3a8

Please sign in to comment.