1.1.0 #20
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: Build/release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v1 | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 15 | |
- name: Install Wine | |
run: | | |
sudo dpkg --add-architecture i386 | |
wget -nc https://dl.winehq.org/wine-builds/winehq.key | |
sudo apt-key add winehq.key | |
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' | |
sudo apt update | |
sudo apt install --install-recommends winehq-stable | |
- name: Install Deps | |
run: npm install | |
- name: Build Electron App | |
run: npm run electron:build -- --win --publish=never | |
- name: Get Tag | |
id: get_tag | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
echo ${GITHUB_REF/refs\/tags\//} | |
echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//} | |
- name: Get Name of Artifact | |
id: get_artifact_name | |
run: | | |
ARTIFACT_PATHNAME=$(ls dist_electron/*.exe | head -n 1) | |
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) | |
echo ::set-output name=ARTIFACT_NAME::${ARTIFACT_NAME} | |
echo ::set-output name=ARTIFACT_PATHNAME::${ARTIFACT_PATHNAME} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@latest | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_tag.outputs.TAG }} | |
release_name: ${{ steps.get_tag.outputs.TAG }} | |
draft: false | |
prerelease: false | |
- name: Upload exe to Release | |
uses: actions/upload-release-asset@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.get_artifact_name.outputs.ARTIFACT_PATHNAME }} | |
asset_name: ${{ steps.get_artifact_name.outputs.ARTIFACT_NAME }} | |
asset_content_type: application/octet-stream |