Skip to content

Commit

Permalink
feat: Addedd release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyht2 committed May 6, 2024
1 parent 923fbcf commit 05c8785
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/release-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Publish

on:
release:
workflow_dispatch:

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
# - platform: 'macos-latest' # for Arm based macs (M1 and above).
# args: '--target aarch64-apple-darwin'
# - platform: 'macos-latest' # for Intel based macs.
# args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix .platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Install Dependencies (Ubuntu Only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
# Other system dependencies
sudo apt-get install -y libudev-dev
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm' # Set this to npm, yarn or pnpm.

- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: Install Frontend Dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: npm install # change this to npm or pnpm depending on which one you use.

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Download Map Data
uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
id: downloadfile # Remember to give an ID if you need the output filename
with:
url: "${{ secrets.MAP_DATA }}"
target: src-tauri/data.mbtiles

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}

0 comments on commit 05c8785

Please sign in to comment.