Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #45

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #45

Workflow file for this run

name: DeckPad Desktop Release
on: push
jobs:
# check version between last tag and package.json - if version not change then the build will fail (correct way to not continue wasting build time)
version:
name: Check version updates
runs-on: ubuntu-latest
outputs:
new: ${{ steps.version_check.outputs.versionChanged }}
v: v${{ steps.version_check.outputs.rawVersion }}
tag: ${{ steps.version_check.outputs.releaseVersion }}
steps:
- uses: actions/checkout@v2
- run: git fetch --all --tags
- name: Check Release Version
id: version_check
uses: thebongy/version-check@v1
with:
file: ./packages/desktop/package.json
tagFormat: desktop-v${version}
failBuild: false
- name:
run: echo "DeckPad Desktop Version ${{steps.version_check.outputs.releaseVersion}}"
# generate build artifacts
artifacts:
runs-on: ${{ matrix.target.os }}
needs: version
if: needs.version.outputs.new == 'true'
defaults:
run:
working-directory: ./packages/desktop
strategy:
matrix:
target: [
{ 'os': 'windows-latest', 'system': 'win', 'arch': 'amd64', 'ext': 'exe' },
{ 'os': 'macos-latest', 'system': 'mac', 'arch': 'amd64', 'ext': 'dmg' },
# { 'os': 'macos-latest', 'system': 'mac', 'arch': 'arm64', 'ext': 'dmg' },
{ 'os': 'ubuntu-latest', 'system': 'linux', 'arch': 'amd64', 'ext': 'AppImage' },
# { 'os': 'ubuntu-latest', 'system': 'linux', 'arch': '386', 'ext': 'dmg' },
]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v2
with:
node-version: 14
- name: Yarn install
run: yarn install
- name: Yarn release - Build nextron desktop app
run: yarn run release
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
path: ./packages/desktop/dist/DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
# create release tag from version
release:
name: Create Desktop Release
runs-on: ubuntu-latest
needs: [ version, artifacts ]
if: needs.version.outputs.new == 'true'
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v2
- name: Create Desktop Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.version.outputs.tag }}
release_name: Desktop ${{ needs.version.outputs.v }}
draft: false
prerelease: false
# Add all the builds as assets to the release
add:
runs-on: ${{ matrix.target.os }}
needs: [ version, artifacts, release ]
if: needs.version.outputs.new == 'true'
strategy:
matrix:
target: [
{ 'os': 'windows-latest', 'system': 'win', 'arch': 'amd64', 'ext': 'exe' },
{ 'os': 'macos-latest', 'system': 'mac', 'arch': 'amd64', 'ext': 'dmg' },
# { 'os': 'macos-latest', 'system': 'mac', 'arch': 'arm64', 'ext': 'dmg' },
{ 'os': 'ubuntu-latest', 'system': 'linux', 'arch': 'amd64', 'ext': 'AppImage' },
# { 'os': 'ubuntu-latest', 'system': 'linux', 'arch': '386', 'ext': 'dmg' },
]
steps:
- uses: actions/checkout@v2
- name: Download Artifact
id: download
uses: actions/[email protected]
with:
name: DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
- name: Upload Artifact to Desktop Release
uses: Fhwang0926/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_name: DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
# asset_path: ./packages/desktop/dist/DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
# asset_name: DeckPad_${{ matrix.target.system }}.${{ matrix.target.ext }}
# asset_content_type: application/zip