Changes #8
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 | |
on: | |
pull_request: | |
types: | |
- opened | |
branches: | |
- 'release/**' | |
push: | |
branches: | |
- 'release/**' | |
workflow_dispatch: | |
jobs: | |
desktop: | |
name: Build desktop installers | |
env: | |
GH_TOKEN: ${{ github.token }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Install ./electron dependencies | |
run: npm --prefix ./electron ci | |
- name: Publish | |
run: npm --prefix ./electron run electron:publish | |
android: | |
name: Build Android installers | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Create build folder | |
run: npm run build | |
- name: Build app bundle | |
run: cd android && ./gradlew bundle && ./gradlew assembleRelease | |
- name: Extract android signing key from env | |
run: | | |
echo "${{ secrets.RELEASE_KEYSTORE }}" > android/release.jks.base64 | |
base64 -d android/release.jks.base64 > android/release.decrypted.jks | |
- name: Sign dev build | |
run: jarsigner -keystore android/release.decrypted.jks -storepass "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" -signedjar ./android/app/build/outputs/bundle/release/app-release-signed.aab ./android/app/build/outputs/bundle/release/app-release.aab release | |
- name: Rename files | |
run: | | |
mv ./android/app/build/outputs/bundle/release/app-release-signed.aab ./android/app/build/outputs/bundle/release/argentum-online-signed.aab | |
mv ./android/app/build/outputs/apk/release/app-release-unsigned.apk ./android/app/build/outputs/apk/release/argentum-online-release-unsigned.apk | |
- name: Get Node project version | |
id: package-version | |
uses: martinbeentjes/[email protected] | |
- name: Publish | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
tag_name: v${{ steps.package-version.outputs.current-version}} | |
files: | | |
./android/app/build/outputs/bundle/release/argentum-online-signed.aab | |
./android/app/build/outputs/apk/release/argentum-online-release-unsigned.apk |