Skip to content

v1.2.0

v1.2.0 #4

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
update-release-to-draft:
if: ${{ github.repository_owner == 'binary-blazer' }}
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Authenticate GitHub CLI
run: echo "${{ secrets.PAT }}" | gh auth login --with-token
- name: Update release type to draft
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release edit "${{ github.event.release.tag_name }}" --draft
publish-macos:
needs: update-release-to-draft
if: ${{ github.repository_owner == 'binary-blazer' }}
runs-on: macos-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm
- name: Install and build
run: |
pnpm install
pnpm run postinstall
pnpm run build
- name: Publish release files
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
pnpm exec electron-builder -- --publish always --mac
publish-ubuntu:
needs: update-release-to-draft
if: ${{ github.repository_owner == 'binary-blazer' }}
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm
- name: Install and build
run: |
pnpm install
pnpm run postinstall
pnpm run build
- name: Publish release files
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
pnpm exec electron-builder -- --publish always --linux
publish-windows:
needs: update-release-to-draft
if: ${{ github.repository_owner == 'binary-blazer' }}
runs-on: windows-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm
- name: Install and build
run: |
pnpm install
pnpm run postinstall
pnpm run build
- name: Publish release files
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
pnpm exec electron-builder -- --publish always --win
update-release-to-original:
needs: [publish-macos, publish-ubuntu, publish-windows]
if: ${{ github.repository_owner == 'binary-blazer' }}
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Install GitHub CLI
run: sudo apt-get install gh
- name: Authenticate GitHub CLI
run: echo "${{ secrets.PAT }}" | gh auth login --with-token
- name: Update release type to original
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release edit "${{ github.event.release.tag_name }}" --draft=false