Skip to content

build

build #20

Workflow file for this run

name: 'build'
on:
workflow_dispatch:
jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install dependencies
run: npm install
- name: Build
if: matrix.platform == 'ubuntu-20.04'
run: |
npm run build
cp -r dist DwarfStellariumGoto
echo "python3 -m http.server" > DwarfStellariumGoto/start_server.bat
zip -r DwarfStellariumGoto.zip DwarfStellariumGoto
- name: Get version number from package.json
id: get_version
run: echo "::set-output name=version::$(node -e 'console.log(require("./package.json").version)')"
- name: Create artifact DwarfStellariumGoto
uses: actions/upload-artifact@v4
with:
name: DwarfStellariumGoto-${{ steps.get_version.outputs.version }}
path: DwarfStellariumGoto.zip
- name: install frontend dependencies
run: npm install
- uses: tauri-apps/tauri-action@v0
id: tauri_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: app-v${{ steps.get_version.outputs.version }}
releaseName: 'v${{ steps.get_version.outputs.version }}-DesktopAPP'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: false
prerelease: false
includeUpdaterJson: true
updaterJsonKeepUniversal: false
- name: Release with ncipollo/release-action
if: matrix.platform == 'ubuntu-20.04'
id: release
uses: ncipollo/release-action@v1
with:
artifacts: DwarfStellariumGoto.zip
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
skipIfReleaseExists: true
tag: v${{ steps.get_version.outputs.version }}
update-gist:
runs-on: ubuntu-latest
needs: [publish-tauri-macos-latest, publish-tauri-ubuntu-20.04, publish-tauri-windows-latest]

Check failure on line 84 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 84, Col: 13): Job 'update-gist' depends on unknown job 'publish-tauri-macos-latest'. .github/workflows/build.yml (Line: 84, Col: 41): Job 'update-gist' depends on unknown job 'publish-tauri-ubuntu-20.04'.
steps:
- name: Get latest release
id: get_latest_release
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const response = await github.repos.getLatestRelease({ owner, repo });
return response.data;
- name: Get latest release content
id: get_latest_release_content
run: |
latest_release_assets=$(curl -s "${{ steps.get_latest_release.outputs.url }}/assets")
latest_release_json=$(echo "$latest_release_assets" | jq '[.[] | {name: .name, download_url: .browser_download_url}]')
echo "::set-output name=latest_release_json::$latest_release_json"
- name: Create updater.json
run: |
current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
latest_release_json=${{ steps.get_latest_release_content.outputs.latest_release_json }}
echo "$latest_release_json" > update.json