Release #41
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: | |
# - "v*.*.*" | |
workflow_dispatch: | |
inputs: | |
tag: | |
type: string | |
description: Release tag | |
required: true | |
prerelease: | |
type: boolean | |
description: Is this a pre-release? | |
required: true | |
jobs: | |
build-macos: | |
name: Build the repository on macOS | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Use Node.js 20 | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
- name: Install node packages | |
run: yarn install | |
- name: Provide 777 execution rights to clipboard handler script | |
run: | | |
sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-mac | |
- name: Set JAPREADER_ENV to 'production' | |
run: export JAPREADER_ENV=production | |
- name: Make | |
run: yarn make | |
- name: Install tree command | |
run: brew install tree | |
- run: tree out/ | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts macos-latest | |
path: out/make/ | |
retention-days: 1 | |
build-ubuntu: | |
name: Build the repository on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Use Node.js 20 | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
- name: Install node packages | |
run: yarn install | |
- name: Install dpkg, fakeroot and rpm | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y dpkg fakeroot rpm | |
- name: Provide 777 execution rights to clipboard handler script | |
run: | | |
sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-linux | |
- name: Set JAPREADER_ENV to 'production' | |
run: export JAPREADER_ENV=production | |
- name: Make | |
run: yarn make | |
- run: tree out/ | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts ubuntu-latest | |
path: out/make/ | |
retention-days: 1 | |
build-windows: | |
name: Build the repository on Windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Use Node.js 20 | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install node packages | |
run: yarn install | |
- name: Set JAPREADER_ENV to 'production' | |
run: SET JAPREADER_ENV=production | |
- name: Make | |
run: yarn make | |
- run: tree out/ | |
- name: Upload a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts windows-latest | |
path: out/make/ | |
retention-days: 1 | |
release: | |
name: Create a new github release ${{ inputs.tag }} | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: [build-ubuntu, build-windows, build-macos] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Download MacOS Build Artifacts | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts macos-latest | |
path: make/ | |
- name: Download Linux Build Artifacts | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts ubuntu-latest | |
path: make/ | |
- name: Download Windows Build Artifacts | |
uses: actions/[email protected] | |
with: | |
name: japReader-artifacts windows-latest | |
path: make/ | |
- name: Get Release body from CHANGELOG.md | |
run: sed -e '/^$/,$d' CHANGELOG.md > CHANGELOG-${{ inputs.tag }}.md | |
- run: tree . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: ${{ inputs.prerelease }} | |
body_path: CHANGELOG-${{ inputs.tag }}.md | |
files: | | |
make/squirrel.windows/x64/*.exe | |
make/zip/win32/x64/*.zip | |
make/deb/x64/*.deb | |
make/rpm/x64/*.rpm | |
make/zip/linux/x64/*.zip | |
make/*.dmg | |
make/zip/darwin/x64/*.zip | |
tag_name: ${{ inputs.tag }} |