-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b110e57
commit 79ca00b
Showing
2 changed files
with
134 additions
and
128 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ inputs: | |
production-release: | ||
description: 'Whether this is a production release' | ||
required: true | ||
release-version: | ||
description: 'The release version' | ||
required: true | ||
release-tag: | ||
description: 'The release tag' | ||
required: true | ||
crabnebula-release-id: | ||
description: 'The CrabNebula release ID' | ||
required: true | ||
# release-version: | ||
# description: 'The release version' | ||
# required: true | ||
# release-tag: | ||
# description: 'The release tag' | ||
# required: true | ||
# crabnebula-release-id: | ||
# description: 'The CrabNebula release ID' | ||
# required: true | ||
apple-certificate: | ||
description: 'The Apple certificate' | ||
required: true | ||
|
@@ -40,15 +40,15 @@ inputs: | |
tauri-signing-public-key: | ||
description: 'The Tauri signing public key' | ||
required: true | ||
crabnebula-org-name: | ||
description: 'The CrabNebula org name' | ||
required: true | ||
crabnebula-app-name: | ||
description: 'The CrabNebula app name' | ||
required: true | ||
crabnebula-api-key: | ||
description: 'The CrabNebula API key' | ||
required: true | ||
# crabnebula-org-name: | ||
# description: 'The CrabNebula org name' | ||
# required: true | ||
# crabnebula-app-name: | ||
# description: 'The CrabNebula app name' | ||
# required: true | ||
# crabnebula-api-key: | ||
# description: 'The CrabNebula API key' | ||
# required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
@@ -78,9 +78,8 @@ runs: | |
echo "Certificate imported." | ||
- name: Setup tauri.conf.json | ||
if: ${{ inputs.release-version != '' }} | ||
# if: ${{ inputs.release-version != '' }} | ||
run: | | ||
sed -i '' "s/\"version\": \"0.1.0\"/\"version\": \"${{ inputs.release-version }}\"/g" "src-tauri/tauri.conf.json" | ||
sed -i '' "s/\"createUpdaterArtifacts\": false/\"createUpdaterArtifacts\": true/g" "src-tauri/tauri.conf.json" | ||
sed -i '' "s/CN_ORG_NAME/${{ inputs.crabnebula-org-name }}/g" "src-tauri/tauri.conf.json" | ||
sed -i '' "s/CN_APP_NAME/${{ inputs.crabnebula-app-name }}/g" "src-tauri/tauri.conf.json" | ||
|
@@ -102,17 +101,25 @@ runs: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ inputs.tauri-signing-private-key }} | ||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ inputs.tauri-signing-private-key-password }} | ||
|
||
- name: Upload artifacts to release | ||
uses: softprops/action-gh-release@v1 | ||
- name: Upload binary as artifact | ||
id: upload-artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
fail_on_unmatched_files: true | ||
files: | | ||
src-tauri/target/release/bundle/dmg/algokit-lora_*.dmg | ||
tag_name: ${{ inputs.release-tag }} | ||
prerelease: ${{ inputs.production-release != 'true' }} | ||
if-no-files-found: error | ||
name: algokit-lora-mac-${{ runner.arch }} | ||
path: src-tauri/target/release/bundle/dmg/algokit-lora_*.dmg | ||
|
||
- name: Upload artifacts to CrabNebula | ||
uses: crabnebula-dev/[email protected] | ||
with: | ||
command: release upload "${{ inputs.crabnebula-org-name }}/${{ inputs.crabnebula-app-name }}" --framework tauri ${{ inputs.production-release != 'true' && '--channel beta' || '' }} | ||
api-key: ${{ inputs.crabnebula-api-key }} | ||
# - name: Upload artifacts to release | ||
# uses: softprops/action-gh-release@v1 | ||
# with: | ||
# fail_on_unmatched_files: true | ||
# files: | | ||
# src-tauri/target/release/bundle/dmg/algokit-lora_*.dmg | ||
# tag_name: ${{ inputs.release-tag }} | ||
# prerelease: ${{ inputs.production-release != 'true' }} | ||
|
||
# - name: Upload artifacts to CrabNebula | ||
# uses: crabnebula-dev/[email protected] | ||
# with: | ||
# command: release upload "${{ inputs.crabnebula-org-name }}/${{ inputs.crabnebula-app-name }}" --framework tauri ${{ inputs.production-release != 'true' && '--channel beta' || '' }} | ||
# api-key: ${{ inputs.crabnebula-api-key }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,56 +26,55 @@ permissions: | |
|
||
env: | ||
PRODUCTION_RELEASE: ${{ github.ref_name == 'main' && inputs.production-release == 'true' }} | ||
|
||
jobs: | ||
create-release: | ||
runs-on: [ubuntu-22.04] | ||
name: Create release | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create GitHub release | ||
uses: ./.github/actions/create-release | ||
id: create-github-release | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
production-release: ${{ env.PRODUCTION_RELEASE }} | ||
node-version: 20 | ||
|
||
- name: Create draft CrabNebula release | ||
uses: crabnebula-dev/[email protected] | ||
id: create-crabnebula-release | ||
if: ${{ steps.create-github-release.outputs.release-published == 'true' }} | ||
with: | ||
command: release draft ${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }} ${{ steps.create-github-release.outputs.release-version }} ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }} | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
- name: Get CrabNebula release ID | ||
id: get-crabnebula-release-id | ||
if: ${{ steps.create-github-release.outputs.release-published == 'true' }} | ||
run: echo "release-id=${{ fromJson(steps.create-crabnebula-release.outputs.stdout).id }}" >> $GITHUB_OUTPUT | ||
|
||
outputs: | ||
release-published: ${{ steps.create-github-release.outputs.release-published }} | ||
release-version: ${{ steps.create-github-release.outputs.release-version }} | ||
release-tag: ${{ steps.create-github-release.outputs.release-tag }} | ||
release-id: ${{ steps.create-github-release.outputs.release-id }} | ||
crabnebula-release-id: ${{ steps.get-crabnebula-release-id.outputs.release-id }} | ||
# create-release: | ||
# runs-on: [ubuntu-22.04] | ||
# name: Create release | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
# - name: Create GitHub release | ||
# uses: ./.github/actions/create-release | ||
# id: create-github-release | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# production-release: ${{ env.PRODUCTION_RELEASE }} | ||
# node-version: 20 | ||
|
||
# - name: Create draft CrabNebula release | ||
# uses: crabnebula-dev/[email protected] | ||
# id: create-crabnebula-release | ||
# if: ${{ steps.create-github-release.outputs.release-published == 'true' }} | ||
# with: | ||
# command: release draft ${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }} ${{ steps.create-github-release.outputs.release-version }} ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }} | ||
# api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
# - name: Get CrabNebula release ID | ||
# id: get-crabnebula-release-id | ||
# if: ${{ steps.create-github-release.outputs.release-published == 'true' }} | ||
# run: echo "release-id=${{ fromJson(steps.create-crabnebula-release.outputs.stdout).id }}" >> $GITHUB_OUTPUT | ||
|
||
# outputs: | ||
# release-published: ${{ steps.create-github-release.outputs.release-published }} | ||
# release-version: ${{ steps.create-github-release.outputs.release-version }} | ||
# release-tag: ${{ steps.create-github-release.outputs.release-tag }} | ||
# release-id: ${{ steps.create-github-release.outputs.release-id }} | ||
# crabnebula-release-id: ${{ steps.get-crabnebula-release-id.outputs.release-id }} | ||
|
||
build-tauri: | ||
name: Build Tauri app | ||
needs: | ||
- create-release | ||
# needs: | ||
# - create-release | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
# macos-14 is the Apple Arm runner | ||
# macos-13 is the Apple Intel runner | ||
# platform: [ubuntu-22.04, windows-latest, macos-13, macos-14] | ||
platform: [windows-latest, macos-13, macos-14] | ||
if: ${{ needs.create-release.outputs.release-published == 'true' }} | ||
# if: ${{ needs.create-release.outputs.release-published == 'true' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -109,53 +108,53 @@ jobs: | |
VITE_TESTNET_DISPENSER_API_URL: https://api.dispenser.algorandfoundation.tools | ||
VITE_TESTNET_DISPENSER_ADDRESS: Z5GPJQCHVU54C2I4FLYNE2XHRQRL5OV2GPJQKXJFMW34CRIN2KRQFXF7DI | ||
|
||
- name: Build for Linux | ||
id: build-linux | ||
if: ${{ runner.os == 'Linux' }} | ||
uses: ./.github/actions/build-linux | ||
with: | ||
release-version: ${{ needs.create-release.outputs.release-version }} | ||
release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
production-release: ${{ env.PRODUCTION_RELEASE }} | ||
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
appimage-signing-private-key: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY }} | ||
appimage-signing-private-key-password: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }} | ||
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
- name: Build for Windows | ||
id: build-windows | ||
if: ${{ runner.os == 'Windows' }} | ||
uses: ./.github/actions/build-windows | ||
with: | ||
release-version: ${{ needs.create-release.outputs.release-version }} | ||
release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
production-release: ${{ env.PRODUCTION_RELEASE }} | ||
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
package_name: algokit-lora | ||
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }} | ||
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }} | ||
azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }} | ||
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
# - name: Build for Linux | ||
# id: build-linux | ||
# if: ${{ runner.os == 'Linux' }} | ||
# uses: ./.github/actions/build-linux | ||
# with: | ||
# release-version: ${{ needs.create-release.outputs.release-version }} | ||
# release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
# production-release: ${{ env.PRODUCTION_RELEASE }} | ||
# crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
# appimage-signing-private-key: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY }} | ||
# appimage-signing-private-key-password: ${{ secrets.APPIMAGE_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
# tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }} | ||
# tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
# tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
# crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
# crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
# crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
# - name: Build for Windows | ||
# id: build-windows | ||
# if: ${{ runner.os == 'Windows' }} | ||
# uses: ./.github/actions/build-windows | ||
# with: | ||
# release-version: ${{ needs.create-release.outputs.release-version }} | ||
# release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
# production-release: ${{ env.PRODUCTION_RELEASE }} | ||
# crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
# package_name: algokit-lora | ||
# azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }} | ||
# azure_client_id: ${{ secrets.AZURE_CLIENT_ID }} | ||
# azure_client_secret: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
# tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }} | ||
# tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
# tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
# crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
# crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
# crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
- name: Build for Mac | ||
id: build-mac | ||
if: ${{ runner.os == 'macOS' }} | ||
uses: ./.github/actions/build-mac | ||
with: | ||
release-version: ${{ needs.create-release.outputs.release-version }} | ||
release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
# release-version: ${{ needs.create-release.outputs.release-version }} | ||
# release-tag: ${{ needs.create-release.outputs.release-tag }} | ||
production-release: ${{ env.PRODUCTION_RELEASE }} | ||
crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
# crabnebula-release-id: ${{ needs.create-release.outputs.crabnebula-release-id }} | ||
apple-certificate: ${{ secrets.APPLE_CERTIFICATE }} | ||
apple-certificate-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }} | ||
|
@@ -165,20 +164,20 @@ jobs: | |
tauri-signing-public-key: ${{ secrets.TAURI_SIGNING_PUBLIC_KEY }} | ||
tauri-signing-private-key: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | ||
tauri-signing-private-key-password: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | ||
crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
publish-crabnebula: | ||
name: Publish CrabNebula release | ||
needs: | ||
- create-release | ||
- build-tauri | ||
runs-on: [ubuntu-22.04] | ||
if: ${{ needs.create-release.outputs.release-published == 'true' }} | ||
steps: | ||
- name: Publish CrabNebula release | ||
uses: crabnebula-dev/[email protected] | ||
with: | ||
command: release publish "${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }}" "${{ needs.create-release.outputs.crabnebula-release-id }}" ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }} | ||
api-key: ${{ secrets.CN_API_KEY }} | ||
# crabnebula-org-name: ${{ secrets.CN_ORG_NAME }} | ||
# crabnebula-app-name: ${{ secrets.CN_APP_NAME }} | ||
# crabnebula-api-key: ${{ secrets.CN_API_KEY }} | ||
|
||
# publish-crabnebula: | ||
# name: Publish CrabNebula release | ||
# needs: | ||
# - create-release | ||
# - build-tauri | ||
# runs-on: [ubuntu-22.04] | ||
# if: ${{ needs.create-release.outputs.release-published == 'true' }} | ||
# steps: | ||
# - name: Publish CrabNebula release | ||
# uses: crabnebula-dev/[email protected] | ||
# with: | ||
# command: release publish "${{ secrets.CN_ORG_NAME }}/${{ secrets.CN_APP_NAME }}" "${{ needs.create-release.outputs.crabnebula-release-id }}" ${{ env.PRODUCTION_RELEASE != 'true' && '--channel beta' || '' }} | ||
# api-key: ${{ secrets.CN_API_KEY }} |