3.4.2 Hotfix 2 #28
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: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- name: Start GitHub Action | |
uses: actions/checkout@v1 | |
- name: Init Git submodules | |
uses: snickerbockers/submodules-init@v4 | |
- name: Install Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependencies | |
run: | | |
npm i yarn --no-save | |
yarn install --frozen-lockfile | |
- name: Build | |
env: | |
PRERELEASE: "${{ github.event.release.prerelease }}" | |
CHANGELOG: ${{ github.event.release.html_url }} | |
run: | | |
if [[ $PRERELEASE == "true" ]]; then yarn run wg --env.CHANGELOG="$CHANGELOG"; else yarn run build; fi | |
- name: Test | |
run: | | |
yarn test | |
- name: Archive Release | |
uses: thedoctor0/[email protected] | |
with: | |
filename: "build.zip" | |
path: "build" | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./build.zip | |
asset_name: build.zip | |
asset_content_type: application/zip | |
- uses: chrnorm/deployment-action@releases/v1 | |
name: Request Production Deployment | |
if: "!github.event.release.prerelease" | |
id: deployment | |
with: | |
token: "${{ github.token }}" | |
target_url: https://monoweb.app | |
ref: "${{ github.event.release.tag_name }}" | |
auto_merge: "false" | |
inititial_status: pending | |
environment: production | |
description: "Release publication" | |
- uses: chrnorm/deployment-action@releases/v1 | |
name: Request Pre-Release Deployment | |
if: "github.event.release.prerelease" | |
id: pre-release-deployment | |
with: | |
token: "${{ github.token }}" | |
target_url: https://beta.monoweb.app | |
ref: "${{ github.event.release.tag_name }}" | |
auto_merge: "false" | |
inititial_status: pending | |
environment: wg | |
description: "Pre-Release publication" |