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: Deploy to Github Releases | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
include: | |
- platform: mac | |
os: "macos-12" | |
- platform: linux | |
os: "ubuntu-22.04" | |
- platform: windows | |
os: "windows-2022" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.target_commitish }} | |
- name: Settp Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: Run install | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: install --network-timeout 1000000 # will run `yarn install` command | |
dir: desktop-app | |
- name: Update package.json | |
run: | | |
./set-version.sh | |
- name: Build production bundle | |
uses: borales/actions-yarn@v5 | |
with: | |
cmd: build # will run `yarn build` command (for each os) | |
dir: desktop-app | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.platform }}-distributables | |
path: desktop-app/dist/Napse-* | |
if-no-files-found: error | |
publish: | |
name: Publish | |
runs-on: "ubuntu-22.04" | |
needs: build | |
steps: | |
- name: Tag Docker image | |
run: | | |
TAG_NAME=$(grep -oP '(?<=# \[)[^\]]+' CHANGELOG.md | head -n 1) | |
VERSION=v$TAG_NAME | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Get all distributables | |
uses: actions/download-artifact@v3 | |
- name: Publish all artifacts to GitHub Releases | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ env.VERSION }} | |
with: | |
files: desktop-app/dist/Napse-* | |
tag_name: ${{ env.VERSION }} | |
body: ${{ github.event.release.body }} | |
draft: false | |
prerelease: false | |