Upgraded to v7.2.2 #125
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: | |
push: | |
tags: | |
- '**' | |
workflow_dispatch: | |
env: | |
NODE_VERSION: 18 | |
# NODE_OPTIONS: --openssl-legacy-provider | |
# TODO: Handle browser extension release | |
jobs: | |
prepare-release: | |
name: Prepare release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- id: release-draft | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.github_token }} | |
prerelease: false | |
draft: true | |
generate_release_notes: true | |
outputs: | |
release-tag: ${{ steps.release-draft.outputs.id }} | |
electron: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.NODE_VERSION }} on ${{ matrix.os }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: maxim-lobanov/setup-xcode@v1 | |
if: startsWith(matrix.os, 'macos') | |
with: | |
xcode-version: latest-stable | |
- run: yarn --frozen-lockfile --network-timeout 1000000 | |
- uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
command: yarn lerna bootstrap | |
- name: Install Snapcraft | |
uses: samuelmeuli/action-snapcraft@v1 | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Prepare for app notarization | |
if: startsWith(matrix.os, 'macos') | |
# Import Apple API key for app notarization on macOS | |
run: | | |
mkdir -p ~/private_keys/ | |
echo '${{ secrets.apple_api_key }}' > ~/private_keys/AuthKey_${{ secrets.apple_api_key_id }}.p8 | |
- name: Build/release Electron app | |
uses: CryogenicPlanet/action-electron-builder@v2 # Using CryogenicPlanet until the main action adds skip_install | |
with: | |
github_token: ${{ secrets.github_token }} | |
package_root: packages/altair-electron/ | |
skip_build: true | |
skip_install: true | |
mac_certs: ${{ secrets.mac_certs }} | |
mac_certs_password: ${{ secrets.mac_certs_password }} | |
args: '--publish always' | |
max_attempts: 3 | |
env: | |
# macOS notarization API key | |
# https://www.codiga.io/blog/notarize-sign-electron-app/ | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLEIDPASS: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} | |
# chocolatey | |
- name: Read VERSION file | |
id: getversion | |
run: echo "::set-output name=version::$(cat VERSION)" | |
- name: Add mask | |
run: | | |
echo "::add-mask::${{ secrets.CHOCOLATEY_API_KEY }}" | |
- name: chocolatey pack | |
if: startsWith(matrix.os, 'windows') | |
uses: crazy-max/[email protected] | |
with: | |
args: pack chocolatey\altair-graphql.nuspec | |
# - name: chocolatey install (test choco packaging) | |
# if: startsWith(matrix.os, 'windows') | |
# uses: crazy-max/[email protected] | |
# with: | |
# args: install altair-graphql --version="${{ steps.getversion.outputs.version }}" --source="altair-graphql.${{ steps.getversion.outputs.version }}.nupkg" | |
- name: chocolatey push | |
if: startsWith(matrix.os, 'windows') | |
uses: crazy-max/[email protected] | |
with: | |
args: push altair-graphql.${{ steps.getversion.outputs.version }}.nupkg -s https://push.chocolatey.org/ -k="'${{ secrets.CHOCOLATEY_API_KEY }}'" | |
- name: Upload source maps to Sentry (app) | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
sourcemaps: packages/altair-app/dist/ | |
version: ${{ steps.getversion.outputs.version }} | |
url_prefix: 'altair://-' | |
finalize: false | |
- name: Upload source maps to Sentry (electron) | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
sourcemaps: packages/altair-electron/dist/ | |
version: ${{ steps.getversion.outputs.version }} | |
url_prefix: 'app:///dist' | |
npm-publish: | |
runs-on: ubuntu-latest | |
needs: electron | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Authenticate with Registry | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: yarn --frozen-lockfile | |
- uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
command: yarn build:ci | |
- run: yarn lerna publish from-git --force-publish=* --no-git-tag-version --no-push --yes | |
publish-release: | |
name: Publish release | |
runs-on: ubuntu-latest | |
needs: [prepare-release, electron] | |
steps: | |
- uses: eregon/publish-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ needs.prepare-release.outputs.release-tag }} |