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