Skip to content

Release

Release #62

Workflow file for this run

name: Release
on: [workflow_dispatch]
jobs:
run-tests:
if: false
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: 20.15.0
cache: "npm"
- name: Install Node dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps
- name: Test
run: npm run test
build-pages:
name: Build GitHub Page
needs: run-tests
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: 20.15.0
cache: "npm"
- name: Install Node dependencies
run: npm ci
- name: Build
run: npm run build -- --base=/abicus/
- name: Upload Pages artefact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
build-docker:
# needs: run-tests
name: Build Docker Image and Push to Abitti 2 ECR
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
role-to-assume: arn:aws:iam::${{ secrets.UTILITY_ACCOUNT_ID }}:role/AbicusPublicGithubActionsAccessRole
aws-region: eu-north-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Get package version
run: echo "ABICUS_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85
with:
push: true
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: GIT_HASH=${{ github.sha }}
tags: |
${{ steps.login-ecr.outputs.registry }}/abicus-prod:v${{ env.ABICUS_VERSION }}-${{ github.run_number }}.${{ github.run_attempt }}
build-binaries:
if: false
needs: run-tests
strategy:
fail-fast: false
matrix:
include:
- title: MacOS (arm64)
platform: macos-latest
args: "--target aarch64-apple-darwin"
- title: MacOS (x86_64)
platform: macos-latest
args: "--target x86_64-apple-darwin"
- title: Ubuntu
platform: ubuntu-20.04
args: ""
- title: Windows
platform: windows-latest
args: ""
name: Build Desktop Application (${{ matrix.title }})
runs-on: ${{ matrix.platform }}
steps:
- name: Check out
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Inject workflow run information into app version
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'macos-latest'
run: |
ABICUS_VERSION=$(jq -r '.version' package.json)
TMP_FILE=$(mktemp)
jq ".version = \"$ABICUS_VERSION-${{ github.run_number }}.${{ github.run_attempt }}\"" package.json > "$TMP_FILE"
mv $TMP_FILE package.json
- name: Inject workflow run information into app version (Windows)
if: matrix.platform == 'windows-latest'
shell: powershell
run: |
$abicus_ver = jq -r ".version" package.json
jq ".version = \`"$abicus_ver-${{ github.run_number }}.${{ github.run_attempt }}\`"" package.json | Out-File tmp-package.json -Encoding UTF8
Move-Item -Path tmp-package.json -Destination package.json -Force
((Get-Content package.json) -join "`n") + "`n" | Set-Content -NoNewline package.json
$content = Get-Content -Path package.json -Raw
$byte_array = [System.Text.Encoding]::UTF8.GetBytes($content)
$base64 = [System.Convert]::ToBase64String($byte_array)
echo $base64
- name: Set up Node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: 20.15.0
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc
with:
target: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Install build dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Node dependencies
run: npm ci
- uses: tauri-apps/tauri-action@41242bd545b6d1310ffc1685fb8bb87e97f0b748
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
with:
args: ${{ matrix.args }}
tagName: v__VERSION__
releaseDraft: false
releaseName: Abicus v__VERSION__
releaseBody: |
<img alt="logo" height="100" src="https://github.com/digabi/abicus/blob/master/app-icon.png" />
### Precompiled binaries
<table>
<tr>
<td>Linux</td>
<td>Windows</td>
<td>MacOS</td>
</tr>
<tr>
<td>
<ul>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/abicus___VERSION___amd64.AppImage">
AppImage (x64)
</a>
</li>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/abicus___VERSION___amd64.deb">
Debian (x64 <code>.deb</code>)
</a>
</li>
</ul>
</td>
<td>
<ul>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/Abicus___VERSION___x64-setup.exe">
Windows Installer (x64 <code>.exe</code>)
</a>
</li>
</ul>
</td>
<td>
<ul>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/Abicus_aarch64.app.tar.gz">
Mac-computers with Apple-processors (<code>.app</code>)
</a>
</li>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/Abicus_x64.app.tar.gz">
Mac-computers with Intel-processors (<code>.app</code>)
</a>
</li>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/Abicus___VERSION___aarch64.dmg">
Mac-computers with Apple-processors (<code>.dmg</code>)
</a>
</li>
<li>
<a href="https://github.com/digabi/abicus/releases/download/v__VERSION__/Abicus___VERSION___x64.dmg">
Mac-computers with Intel-processors (<code>.dmg</code>)
</a>
</li>
</ul>
</td>
</tr>
</table>