Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Broken-Deer committed Aug 14, 2024
1 parent adbce89 commit 8c001fa
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
- uses: actions/checkout@v3

- name: Get app version
id: step
run: |
echo "APP_VERSION=$(jq -r .version src-tauri/tauri.conf.json)" >> $GITHUB_ENV
echo $GITHUB_ENV
echo "APP_VERSION=$(jq -r .version src-tauri/tauri.conf.json)" >> "$GITHUB_OUTPUT" && echo "APP_VERSION=$(jq -r .version src-tauri/tauri.conf.json)"
outputs:
app_version: ${{ env.APP_VERSION }}
app_version: ${{ steps.step.outputs }}

build-arm-linux:
needs: [get-version]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
Expand Down Expand Up @@ -80,26 +81,23 @@ jobs:
# Build the application
yarn tauri build -- --verbose
- name: Get app version
run: echo "APP_VERSION=$(jq -r .version src-tauri/tauri.conf.json)" >> $GITHUB_ENV

- name: Upload deb bundle
uses: actions/upload-artifact@v3
with:
name: Debian Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/appname_${{ env.APP_VERSION }}_${{ matrix.deb }}.deb
path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/appname_${{ needs.get-version.outputs.app_version }}_${{ matrix.deb }}.deb

- name: Upload rpm bundle
uses: actions/upload-artifact@v3
with:
name: RPM Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/rpm/appname-${{ env.APP_VERSION }}-1.${{ matrix.rpm }}.rpm
path: ${{ github.workspace }}/src-tauri/target/release/bundle/rpm/appname-${{ needs.get-version.outputs.app_version }}-1.${{ matrix.rpm }}.rpm

- name: Upload appimage bundle
uses: actions/upload-artifact@v3
with:
name: AppImage Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/appimage/appname_${{ env.APP_VERSION }}_${{ matrix.appimage }}.AppImage
path: ${{ github.workspace }}/src-tauri/target/release/bundle/appimage/appname_${{ needs.get-version.outputs.app_version }}_${{ matrix.appimage }}.AppImage
build-other:
needs: [get-version]
permissions:
Expand All @@ -126,7 +124,7 @@ jobs:
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
echo ${{ env.APP_VERSION }}
echo ${{ needs.get-version.outputs.app_version }}
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf tree
Expand Down Expand Up @@ -172,49 +170,42 @@ jobs:
if: matrix.platform == 'ubuntu-22.04'
with:
name: Debian Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/amethyst-launcher_${{ env.APP_VERSION }}_amd64.deb
path: ${{ github.workspace }}/src-tauri/target/release/bundle/deb/amethyst-launcher_${{ needs.get-version.outputs.app_version }}_amd64.deb

- name: Upload rpm bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-22.04'
with:
name: RPM Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/rpm/amethyst-launcher-${{ env.APP_VERSION }}-1.x86_64.rpm
path: ${{ github.workspace }}/src-tauri/target/release/bundle/rpm/amethyst-launcher-${{ needs.get-version.outputs.app_version }}-1.x86_64.rpm

- name: Upload appimage bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'ubuntu-22.04'
with:
name: AppImage Bundle
path: ${{ github.workspace }}/src-tauri/target/release/bundle/appimage/amethyst-launcher_${{ env.APP_VERSION }}_amd64.AppImage
path: ${{ github.workspace }}/src-tauri/target/release/bundle/appimage/amethyst-launcher_${{ needs.get-version.outputs.app_version }}_amd64.AppImage

- name: Upload msi bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'windows-latest'
with:
name: Windows Bundle(msi)
path: ${{ github.workspace }}/src-tauri/target/release/bundle/msi/amethyst-launcher_${{ env.APP_VERSION }}_x64_en-US.msi
path: ${{ github.workspace }}/src-tauri/target/release/bundle/msi/amethyst-launcher_${{ needs.get-version.outputs.app_version }}_x64_en-US.msi

- name: Upload exe bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'windows-latest'
with:
name: Windows Bundle(exe)
path: ${{ github.workspace }}/src-tauri/target/release/bundle/exe/amethyst-launcher_${{ env.APP_VERSION }}_x64-setup.exe
path: ${{ github.workspace }}/src-tauri/target/release/bundle/exe/amethyst-launcher_${{ needs.get-version.outputs.app_version }}_x64-setup.exe

- name: Upload dmg bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'macos-latest'
with:
name: MacOS ${{ matrix.arch }} bundle(dmg)
path: ${{ github.workspace }}/src-tauri/target/${{matrix.arch}}-apple-darwin/release/bundle/dmg/amethyst-launcher_${{ env.APP_VERSION }}_${{ matrix.arch }}.dmg

- name: Upload app bundle
uses: actions/upload-artifact@v3
if: matrix.platform == 'macos-latest'
with:
name: MacOS ${{ matrix.arch }} bundle(app)
path: ${{ github.workspace }}/src-tauri/target/${{matrix.arch}}-apple-darwin/release/bundle/macos/amethyst-launcher.app
path: ${{ github.workspace }}/src-tauri/target/${{matrix.arch}}-apple-darwin/release/bundle/dmg/amethyst-launcher_${{ needs.get-version.outputs.app_version }}_${{ matrix.arch }}.dmg
# - uses: tauri-apps/tauri-action@v0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 8c001fa

Please sign in to comment.