Skip to content

dispatch-staging

dispatch-staging #26

Workflow file for this run

name: Staging
on:
repository_dispatch:
types: ["dispatch-staging"]
workflow_dispatch:
jobs:
deploy:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js 12
uses: actions/setup-node@v2
with:
node-version: '12'
# Download .war from GitHub workflow artifact
- name: Download WAR binary from GitHub artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: staging.yml
branch: staging
repo: keeps/dbptk-ui
# Rename and moves the WAR
- name: Prepare WAR
run: |
mkdir -p resources/war
mv artifact/dbvtk-staging.war resources/war/dbvtk.war
- name: Package
run: yarn --link-duplicates --pure-lockfile && yarn dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUNNER_OS: ${{ runner.os }}
- name: Install Snapcraft
if: startsWith(matrix.os, 'ubuntu')
uses: samuelmeuli/action-snapcraft@v1
with:
snapcraft_token: ${{ secrets.SNAP_TOKEN_EDGE }}
- name: Upload to snapcraft
if: startsWith(matrix.os, 'ubuntu')
run: snapcraft upload --release=edge dist/dbptk-desktop*.snap
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
dist/*
!dist/linux-unpacked/*
!dist/win-unpacked/*
!dist/win-ia32-unpacked/*
!dist/mac/*
retention-days: 1