mirror of
https://github.com/sebastiandine/Card-Collection-Manager-2.git
synced 2026-08-28 17:00:55 +00:00
initial commit
This commit is contained in:
Executable
+117
@@ -0,0 +1,117 @@
|
||||
name: Tauri Release Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
|
||||
create-release:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
version: ${{ steps.metadata.outputs.version }}
|
||||
release_upload_url: ${{ steps.create-release.outputs.upload_url }}
|
||||
|
||||
steps:
|
||||
- name: Checkout the branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Fecht metadata
|
||||
id: metadata
|
||||
run: |
|
||||
echo "version=$(cat version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Release
|
||||
id: create-release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ steps.metadata.outputs.version }}
|
||||
release_name: ${{ steps.metadata.outputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
echo ${{ steps.metadata.outputs.version }}
|
||||
echo ${{ steps.create-release.outputs.upload_url }}
|
||||
|
||||
build:
|
||||
needs: create-release
|
||||
strategy: # see https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
|
||||
fail-fast: true
|
||||
matrix:
|
||||
platform: [ubuntu-20.04, windows-latest, macos-latest]
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- name: Checkout the branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup NodeJS 16
|
||||
uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Setup Rust Stable Toolchain
|
||||
uses: actions-rs/toolchain@v1.0.6
|
||||
with:
|
||||
toolchain: stable
|
||||
node-version: 16
|
||||
|
||||
- name: Install Linux Build Dependencies (Linux Only!)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
|
||||
|
||||
- name: build app
|
||||
run: |
|
||||
cd card-collection-manager-2
|
||||
yarn && yarn tauri build
|
||||
|
||||
- name: upload release asset (Windows)
|
||||
if: matrix.platform == 'windows-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/msi/card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64_en-US.msi
|
||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64_en-US.msi
|
||||
asset_content_type: application/x-msi
|
||||
|
||||
- name: upload release asset (Linux/Debian)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/deb/card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.deb
|
||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.deb
|
||||
asset_content_type: application/x-debian-package
|
||||
|
||||
- name: upload release asset (Linux/AppImage)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/appimage/card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.AppImage
|
||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.AppImage
|
||||
asset_content_type: application/x-executable
|
||||
|
||||
- name: upload release asset (MacOS)
|
||||
if: matrix.platform == 'macos-latest'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/dmg/card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64.dmg
|
||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64.dmg
|
||||
asset_content_type: application/x-apple-diskimage
|
||||
@@ -0,0 +1,37 @@
|
||||
name: Tauri Snapshot Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*", "!master" ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout the branch
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup NodeJS 16
|
||||
uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Setup Rust Stable Toolchain
|
||||
uses: actions-rs/toolchain@v1.0.6
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: build app
|
||||
run: |
|
||||
cd card-collection-manager-2
|
||||
yarn && yarn tauri build
|
||||
ls src-tauri/target
|
||||
|
||||
- name: upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: target
|
||||
path: card-collection-manager-2/src-tauri/target/release/bundle
|
||||
|
||||
Reference in New Issue
Block a user