dispatch-staging #26
This file contains hidden or 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: 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 |