Package #25
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: Package | |
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
env: | |
CI: true | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Generate release notes | |
run: ./release-notes.sh ${{ env.RELEASE_VERSION }} > RELEASE_NOTES.md | |
- run: cat RELEASE_NOTES.md | |
- run: yarn --frozen-lockfile | |
- name: Build application | |
run: yarn build | |
env: | |
REACT_APP_RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | |
REACT_APP_COMMIT_HASH: ${{ github.sha }} | |
- name: Zip release artifact | |
working-directory: ./build | |
run: zip -r ../metaflow-ui-${{ env.RELEASE_VERSION }}.zip ./* | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: metaflow-ui-${{ env.RELEASE_VERSION }} | |
path: ./build | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body_path: RELEASE_NOTES.md | |
draft: true | |
prerelease: false | |
- name: Upload release package | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: metaflow-ui-${{ env.RELEASE_VERSION }}.zip | |
asset_name: metaflow-ui-${{ env.RELEASE_VERSION }}.zip | |
asset_content_type: application/zip |