Skip to content

Commit

Permalink
Merge pull request #2481 from NAmorim/develop
Browse files Browse the repository at this point in the history
Update github release workflow
  • Loading branch information
Luis-Fernando-Molina authored Nov 2, 2021
2 parents fd6f5a3 + f7c862a commit d76ee92
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 13 deletions.
51 changes: 40 additions & 11 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,69 @@
name: Build/release Binaries

on:
push:
pull_request:
branches: [master]
tags:
- '*'
release:
types: [published, created, edited]
#release:
# types: [published, created]

workflow_dispatch:

jobs:
release:
runs-on: ${{ matrix.os }}
create-release:
runs-on: ubuntu-latest
steps:
- name: Download a file
run: curl "https://raw.githubusercontent.com/${{ github.repository }}/master/package.json" -o package.json

- name: get-version
id: version
uses: nyaa8/package-version@v1
with:
path: './package.json'

- name: Create release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: Superalgos-v${{ env.PACKAGE_VERSION }}

build-release:
runs-on: ${{ matrix.os }}
needs: create-release
strategy:
matrix:
os: [windows-latest, macos-latest]
matrix:
os: [windows-latest, macos-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
ref: develop

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14

- name: get-version
id: version
uses: nyaa8/package-version@v1
with:
path: './package.json'

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-c.extraMetadata.main=electron-wrapper.js -c build/electron-builder.json"
args: "-c.extraMetadata.version=${{ env.PACKAGE_VERSION }} -c build/electron-builder.json -p always"

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/') }}
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
release: true

2 changes: 0 additions & 2 deletions .github/workflows/release_build_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ jobs:
path: './package.json'

- name: Build/release Electron app
#env:
# DATE: ${{ steps.date.outputs.date }}
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
Expand Down

0 comments on commit d76ee92

Please sign in to comment.