Read version directly in upload step, not from step outputs
This commit is contained in:
@@ -19,13 +19,6 @@ jobs:
|
||||
shell: powershell
|
||||
run: git submodule update --init --depth=1
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
shell: powershell
|
||||
run: |
|
||||
$v = (Get-Content src-tauri\tauri.conf.json | ConvertFrom-Json).version
|
||||
"version=$v" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: src-tauri
|
||||
@@ -50,8 +43,9 @@ jobs:
|
||||
shell: powershell
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
$VERSION = (Get-Content src-tauri\tauri.conf.json | ConvertFrom-Json).version
|
||||
|
||||
# Get or create the latest release
|
||||
$release = Invoke-RestMethod -Uri "$env:GITEA_URL/api/v1/repos/$env:REPO/releases/tags/latest" `
|
||||
-Headers @{ Authorization = "token $TOKEN" } -ErrorAction SilentlyContinue
|
||||
@@ -89,11 +83,6 @@ jobs:
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
echo "version=$(python3 -c "import json; print(json.load(open('src-tauri/tauri.conf.json'))['version'])")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install system deps
|
||||
run: |
|
||||
apt-get update
|
||||
@@ -129,8 +118,8 @@ jobs:
|
||||
- name: Upload to release
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
VERSION=$(python3 -c "import json; print(json.load(open('src-tauri/tauri.conf.json'))['version'])")
|
||||
# Get or create the latest release
|
||||
RELEASE=$(curl -sf "$GITEA_URL/api/v1/repos/$REPO/releases/tags/latest" \
|
||||
-H "Authorization: token $TOKEN" 2>/dev/null || true)
|
||||
|
||||
Reference in New Issue
Block a user