Skip to content

Mango v1.0.9

Mango v1.0.9 #21

Workflow file for this run

name: Release
on:
release:
types: [published]
permissions:
contents: write
env:
PERRY_LICENSE_KEY: ${{ secrets.PERRY_LICENSE_KEY }}
jobs:
build-macos:
name: macOS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone hone-editor dependency
run: |
git clone --depth 1 "$HONE_EDITOR_REPO" ../hone/hone-editor
rm -rf ../hone/hone-editor/.git ../hone/hone-editor/node_modules ../hone/hone-editor/examples
env:
HONE_EDITOR_REPO: ${{ secrets.HONE_EDITOR_REPO }}
- name: Install perry
run: |
mkdir -p /tmp/perry-install
gh release download --repo PerryTS/perry --pattern 'perry-linux-x86_64.tar.gz' --dir /tmp/perry-install
tar xzf /tmp/perry-install/perry-linux-x86_64.tar.gz -C /tmp/perry-install
sudo mv /tmp/perry-install/perry /usr/local/bin/
rm -rf /tmp/perry-install
perry --version
env:
GH_TOKEN: ${{ github.token }}
- name: Set build number
run: sed -i "s/^build_number = .*/build_number = ${{ github.run_number }}/" perry.toml
- name: Decode signing credentials
run: |
echo "${{ secrets.APPLE_APPSTORE_P12 }}" | base64 -d > /tmp/macos_appstore.p12
echo "${{ secrets.APPLE_INSTALLER_P12 }}" | base64 -d > /tmp/macos_installer.p12
echo "${{ secrets.APPLE_DEVID_P12 }}" | base64 -d > /tmp/macos_devid.p12
echo "${{ secrets.APPLE_P8_KEY }}" | base64 -d > /tmp/appstore_connect.p8
- name: Inject credential paths into perry.toml
run: |
sed -i '/^\[macos\]/a certificate = "/tmp/macos_appstore.p12"' perry.toml
sed -i '/^\[macos\]/a installer_certificate = "/tmp/macos_installer.p12"' perry.toml
sed -i '/^\[macos\]/a notarize_certificate = "/tmp/macos_devid.p12"' perry.toml
- name: Publish macOS
run: |
perry publish macos \
--certificate /tmp/macos_appstore.p12 \
--apple-p8-key /tmp/appstore_connect.p8 \
--apple-key-id "$PERRY_APPLE_KEY_ID" \
--apple-issuer-id "$PERRY_APPLE_ISSUER_ID" \
--apple-team-id "$PERRY_APPLE_TEAM_ID"
env:
PERRY_APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
PERRY_APPLE_NOTARIZE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
PERRY_APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
PERRY_APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
PERRY_APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
- name: Rename and upload artifact
run: |
VERSION="${GITHUB_REF_NAME#v}"
mv dist/Mango-*.dmg "dist/Mango-${VERSION}-macos.dmg"
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/Mango-*-macos.dmg
build-linux:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone hone-editor dependency
run: |
git clone --depth 1 "$HONE_EDITOR_REPO" ../hone/hone-editor
rm -rf ../hone/hone-editor/.git ../hone/hone-editor/node_modules ../hone/hone-editor/examples
env:
HONE_EDITOR_REPO: ${{ secrets.HONE_EDITOR_REPO }}
- name: Install perry
run: |
mkdir -p /tmp/perry-install
gh release download --repo PerryTS/perry --pattern 'perry-linux-x86_64.tar.gz' --dir /tmp/perry-install
tar xzf /tmp/perry-install/perry-linux-x86_64.tar.gz -C /tmp/perry-install
sudo mv /tmp/perry-install/perry /usr/local/bin/
rm -rf /tmp/perry-install
perry --version
env:
GH_TOKEN: ${{ github.token }}
- name: Set build number
run: sed -i "s/^build_number = .*/build_number = ${{ github.run_number }}/" perry.toml
- name: Publish Linux
run: perry publish linux
- name: Rename and upload artifact
run: |
VERSION="${GITHUB_REF_NAME#v}"
mv dist/Mango-*.tar.gz "dist/Mango-${VERSION}-linux-x86_64.tar.gz"
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/Mango-*-linux-x86_64.tar.gz
build-windows:
name: Windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone hone-editor dependency
run: |
git clone --depth 1 "$HONE_EDITOR_REPO" ../hone/hone-editor
rm -rf ../hone/hone-editor/.git ../hone/hone-editor/node_modules ../hone/hone-editor/examples
env:
HONE_EDITOR_REPO: ${{ secrets.HONE_EDITOR_REPO }}
- name: Install perry
run: |
mkdir -p /tmp/perry-install
gh release download --repo PerryTS/perry --pattern 'perry-linux-x86_64.tar.gz' --dir /tmp/perry-install
tar xzf /tmp/perry-install/perry-linux-x86_64.tar.gz -C /tmp/perry-install
sudo mv /tmp/perry-install/perry /usr/local/bin/
rm -rf /tmp/perry-install
perry --version
env:
GH_TOKEN: ${{ github.token }}
- name: Set build number
run: sed -i "s/^build_number = .*/build_number = ${{ github.run_number }}/" perry.toml
- name: Decode signing credentials
run: |
echo "${{ secrets.GCLOUD_KMS_CERT }}" | base64 -d > /tmp/skelpo_codesign.crt
echo "${{ secrets.GCLOUD_SERVICE_ACCOUNT }}" | base64 -d > /tmp/gcloud-codesign.json
- name: Inject credential paths into perry.toml
run: |
sed -i '/^\[windows\]/a gcloud_kms_cert = "/tmp/skelpo_codesign.crt"' perry.toml
sed -i '/^\[windows\]/a gcloud_service_account = "/tmp/gcloud-codesign.json"' perry.toml
- name: Publish Windows
run: perry publish windows
- name: Rename and upload artifact
run: |
VERSION="${GITHUB_REF_NAME#v}"
mv dist/Mango-*.exe "dist/Mango-${VERSION}-windows-setup.exe"
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/Mango-*-windows-setup.exe
build-ios:
name: iOS (TestFlight)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone hone-editor dependency
run: |
git clone --depth 1 "$HONE_EDITOR_REPO" ../hone/hone-editor
rm -rf ../hone/hone-editor/.git ../hone/hone-editor/node_modules ../hone/hone-editor/examples
env:
HONE_EDITOR_REPO: ${{ secrets.HONE_EDITOR_REPO }}
- name: Install perry
run: |
mkdir -p /tmp/perry-install
gh release download --repo PerryTS/perry --pattern 'perry-linux-x86_64.tar.gz' --dir /tmp/perry-install
tar xzf /tmp/perry-install/perry-linux-x86_64.tar.gz -C /tmp/perry-install
sudo mv /tmp/perry-install/perry /usr/local/bin/
rm -rf /tmp/perry-install
perry --version
env:
GH_TOKEN: ${{ github.token }}
- name: Set build number
run: sed -i "s/^build_number = .*/build_number = ${{ github.run_number }}/" perry.toml
- name: Decode signing credentials
run: |
echo "${{ secrets.APPLE_IOS_P12 }}" | base64 -d > /tmp/ios_distribution.p12
echo "${{ secrets.APPLE_PROVISIONING_PROFILE }}" | base64 -d > /tmp/perry.mobileprovision
echo "${{ secrets.APPLE_P8_KEY }}" | base64 -d > /tmp/appstore_connect.p8
- name: Inject credential paths into perry.toml
run: |
sed -i '/^\[ios\]/a certificate = "/tmp/ios_distribution.p12"' perry.toml
sed -i '/^\[ios\]/a provisioning_profile = "/tmp/perry.mobileprovision"' perry.toml
- name: Publish iOS to TestFlight
run: |
perry publish ios \
--certificate /tmp/ios_distribution.p12 \
--provisioning-profile /tmp/perry.mobileprovision \
--apple-p8-key /tmp/appstore_connect.p8 \
--apple-key-id "$PERRY_APPLE_KEY_ID" \
--apple-issuer-id "$PERRY_APPLE_ISSUER_ID" \
--apple-team-id "$PERRY_APPLE_TEAM_ID"
env:
PERRY_APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
PERRY_APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
PERRY_APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
PERRY_APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
build-android:
name: Android (Play Store)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone hone-editor dependency
run: |
git clone --depth 1 "$HONE_EDITOR_REPO" ../hone/hone-editor
rm -rf ../hone/hone-editor/.git ../hone/hone-editor/node_modules ../hone/hone-editor/examples
env:
HONE_EDITOR_REPO: ${{ secrets.HONE_EDITOR_REPO }}
- name: Install perry
run: |
mkdir -p /tmp/perry-install
gh release download --repo PerryTS/perry --pattern 'perry-linux-x86_64.tar.gz' --dir /tmp/perry-install
tar xzf /tmp/perry-install/perry-linux-x86_64.tar.gz -C /tmp/perry-install
sudo mv /tmp/perry-install/perry /usr/local/bin/
rm -rf /tmp/perry-install
perry --version
env:
GH_TOKEN: ${{ github.token }}
- name: Set build number
run: sed -i "s/^build_number = .*/build_number = ${{ github.run_number }}/" perry.toml
- name: Decode signing credentials
run: |
echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 -d > /tmp/mango.keystore
echo "${{ secrets.GOOGLE_PLAY_KEY_JSON }}" | base64 -d > /tmp/googleplay.json
- name: Inject credential paths into perry.toml
run: |
sed -i '/^\[android\]/a keystore = "/tmp/mango.keystore"' perry.toml
sed -i '/^\[android\]/a google_play_key = "/tmp/googleplay.json"' perry.toml
- name: Publish Android to Play Store
run: perry publish android
env:
PERRY_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}