hide deepl box again - epic fail #50
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 | |
# This will trigger the action on each push to the `release` branch. | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
build-ubuntu: | |
name: Build the repository on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Use Node.js 18 | |
uses: actions/[email protected] | |
with: | |
cache: "npm" | |
node-version: 18 | |
- name: Update npm | |
run: sudo npm install -g npm | |
- name: Install electron | |
run: sudo npm install -g electron --unsafe-perm=true --allow-root | |
- name: Install npm packages | |
run: sudo npm ci | |
- 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 | |
sudo chmod 777 node_modules/clipboard-event/platform/clipboard-event-handler-mac | |
- name: Set NODE_ENV to 'production' | |
run: export NODE_ENV=production | |
- name: Make | |
run: sudo npm run make --if-present | |
- run: sudo tree . -I 'node_modules|japreader-linux-x64' | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
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 18 | |
uses: actions/[email protected] | |
with: | |
cache: "npm" | |
node-version: 18 | |
- name: Update npm | |
run: npm install -g npm | |
- name: Install npm packages | |
run: npm ci | |
- name: Set NODE_ENV to 'production' | |
run: SET NODE_ENV=production | |
- name: Make | |
run: npm run make --if-present | |
- run: tree . | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: japReader-artifacts windows-latest | |
path: out/make/ | |
retention-days: 1 | |
release: | |
name: Create a new github release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
needs: [build-ubuntu, build-windows] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Download Linux Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: japReader-artifacts ubuntu-latest | |
path: make/ | |
- name: Download Windows Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: japReader-artifacts windows-latest | |
path: make/ | |
- name: Get current package version | |
uses: martinbeentjes/[email protected] | |
- name: Get Release body from CHANGELOG.md | |
run: sed -e '/^$/,$d' CHANGELOG.md > CHANGELOG-${{ steps.package-version.outputs.current-version }}.md | |
- run: tree . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
body_path: CHANGELOG-${{ steps.package-version.outputs.current-version }}.md | |
files: | | |
make/deb/x64/*.deb | |
make/rpm/x64/*.rpm | |
make/zip/linux/x64/*.zip | |
make/zip/win32/x64/*.zip | |
make/squirrel.windows/x64/*.exe | |
Anki_japReader.apkg | |
tag_name: ${{ steps.package-version.outputs.current-version }} |