Release 5.3.0 #48
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: Release Artifacts | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
test-tauri: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
NAME: macos | |
- os: ubuntu-latest | |
NAME: linux | |
- os: windows-latest | |
NAME: windows | |
runs-on: ${{ matrix.os}} | |
env: | |
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | |
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} | |
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "npm" | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./core -> target" | |
- name: Install trusted-signing-cli | |
if: matrix.NAME == 'windows' | |
run: | | |
cargo install trusted-signing-cli@0.3.0 | |
- name: "Apple silicon target" | |
if: runner.os == 'macOS' | |
run: | | |
rustup target add aarch64-apple-darwin | |
rustup target add x86_64-apple-darwin | |
- name: Install webkit2gtk (ubuntu only) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | |
- name: Install app dependencies and build it | |
if: runner.os == 'Linux' || runner.os == 'Windows' | |
run: npm ci && npm run build | |
- name: Install app dependencies and build it | |
if: runner.os == 'macOS' | |
run: npm ci && npm run build -- --target universal-apple-darwin | |
- name: Remove useless folders | |
run: | | |
rm -rf core/target/release/build | |
rm -rf core/target/release/deps | |
rm -rf core/target/release/bundle/appimage/authme.AppDir | |
npm run rename | |
shell: bash | |
- uses: octokit/request-action@v2.x | |
id: get_latest_release | |
with: | |
route: GET /repos/:repository/releases?per_page=1 | |
repository: ${{ github.repository }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get upload url | |
id: get_upload_url | |
run: > | |
url=$(echo "$response" | jq -r ".[0].upload_url") | |
echo "::set-output name=url::$url" | |
env: | |
response: ${{ steps.get_latest_release.outputs.data }} | |
shell: bash | |
- name: Get version | |
id: version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: package.json | |
prop_path: version | |
# Windows | |
- name: Upload the windows installer asset | |
if: runner.os == 'Windows' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_upload_url.outputs.url}} | |
asset_path: ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-windows-x64.msi | |
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64.msi | |
asset_content_type: application/octet-stream | |
- name: Upload the windows updater asset | |
if: runner.os == 'Windows' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_upload_url.outputs.url}} | |
asset_path: ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-windows-x64.zip | |
asset_name: authme-${{steps.version.outputs.prop}}-windows-x64.zip | |
asset_content_type: application/octet-stream | |
# Linux | |
- name: Upload the linux installer asset | |
if: runner.os == 'Linux' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_upload_url.outputs.url}} | |
asset_path: ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-linux-x64.appimage | |
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64.appimage | |
asset_content_type: application/octet-stream | |
- name: Upload the linux installer asset | |
if: runner.os == 'Linux' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_upload_url.outputs.url}} | |
asset_path: ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-linux-x64.deb | |
asset_name: authme-${{steps.version.outputs.prop}}-linux-x64.deb | |
asset_content_type: application/octet-stream | |
# Mac | |
- name: Upload the mac installer asset | |
if: runner.os == 'macOS' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.get_upload_url.outputs.url}} | |
asset_path: ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-macos-universal.dmg | |
asset_name: authme-${{steps.version.outputs.prop}}-macos-universal.dmg | |
asset_content_type: application/octet-stream | |
- name: Hash | |
if: runner.os == 'Windows' || runner.os == 'Linux' | |
run: cat ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-${{matrix.NAME}}-x64.sig | |
shell: bash | |
- name: Hash | |
if: runner.os == 'macOS' | |
run: cat ./core/target/release/upload/authme-${{steps.version.outputs.prop}}-${{matrix.NAME}}-universal.sig | |
shell: bash | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: authme-latest-release-${{matrix.NAME}}-x64-installer-portable | |
path: core/target/release |