ci(backend): release can be made manually #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- ci # main | |
tags: | |
- "*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
upload_license: | |
name: Upload License | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: LICENSE | |
path: LICENSE | |
build: | |
name: Build - ${{ matrix.platform }} | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
matrix: | |
platform: [macos-latest, windows-latest] # ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: whooosh-${{ matrix.platform }} | |
workspaces: src-tauri | |
- uses: volta-cli/action@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt install libwebkit2gtk-4.0-dev \ | |
build-essential \ | |
curl \ | |
wget \ | |
file \ | |
libssl-dev \ | |
libgtk-3-dev \ | |
libayatana-appindicator3-dev \ | |
librsvg2-dev | |
- run: yarn install --immutable | |
- run: yarn tauri build --ci | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifact | |
path: src-tauri/target/release/bundle | |
retention-days: 7 | |
upload_to_release: | |
needs: [build, upload_license] | |
name: Publish binaries | |
runs-on: ubuntu-latest | |
# if: ${{ github.ref_type == 'tag' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ~/artifacts | |
- run: ls -R | |
- name: Copy artifacts to archive | |
run: | | |
mkdir ups-and-downs.app | |
cp -r /home/runner/artifact/bundle/macos/ups-and-downs.app ups-and-downs.app | |
chmod +x -R ups-and-downs.app | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.app/ | |
tar -czf ups-and-downs.app.tar.gz ups-and-downs.app/* | |
mkdir ups-and-downs.dmg | |
cp -r /home/runner/artifact/bundle/dmg ups-and-downs.dmg | |
chmod +x -R ups-and-downs.dmg | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.dmg/ | |
tar -czf ups-and-downs.dmg.tar.gz ups-and-downs.dmg/* | |
mkdir ups-and-downs.deb | |
cp -r /home/runner/artifact/bundle/deb ups-and-downs.deb | |
chmod +x -R ups-and-downs.deb | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.deb/ | |
tar -czf ups-and-downs.deb.tar.gz ups-and-downs.deb/* | |
mkdir ups-and-downs.appimage | |
cp -r /home/runner/artifact/bundle/appimage ups-and-downs.appimage | |
chmod +x -R ups-and-downs.appimage | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.appimage/ | |
tar -czf ups-and-downs.appimage.tar.gz ups-and-downs.appimage/* | |
mkdir ups-and-downs.nsis | |
cp -r /home/runner/artifact/bundle/nsis ups-and-downs.nsis | |
chmod +x -R ups-and-downs.nsis | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.nsis/ | |
tar -czf ups-and-downs.nsis.tar.gz ups-and-downs.nsis/* | |
mkdir ups-and-downs.msi | |
cp -r /home/runner/artifact/bundle/msi ups-and-downs.msi | |
chmod +x -R ups-and-downs.msi | |
cp -r /home/runner/artifact/LICENSE/LICENSE ups-and-downs.msi/ | |
tar -czf ups-and-downs.msi.tar.gz ups-and-downs.msi/* | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.app.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.app.tar.gz | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.dmg.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.dmg.tar.gz | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.deb.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.deb.tar.gz | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.appimage.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.appimage.tar.gz | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.nsis.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.nsis.tar.gz | |
- uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ups-and-downs.msi.tar.gz | |
tag: ${{ github.ref_name }} | |
asset_name: ups-and-downs-${{ github.ref_name }}.msi.tar.gz |