This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Github Releases | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: yarn install | ||
# - name: Test | ||
# run: npm test | ||
# env: | ||
# CI: true | ||
- name: Generate build | ||
run: yarn run build | ||
# Share artifact inside workflow | ||
- name: Share artifact inside workflow | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: react-github-actions-build | ||
path: dist/ | ||
release: | ||
runs-on: ubuntu-latest | ||
# We specify that deploys needs to | ||
# finish before we create a release | ||
needs: build | ||
steps: | ||
# Download previously shared build | ||
- name: Get artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: react-github-actions-build | ||
# Zip the build using external action | ||
- name: Zip build | ||
uses: thedoctor0/zip-release@master | ||
with: | ||
filename: release | ||
run: zip -r release.zip . -i react-github-actions-build | ||
# Upload as an artifact of the current workflow | ||
- name: Upload build zip artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: release | ||
path: release.zip | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: release.zip | ||
token: ${{ secrets.TOKEN }} | ||
# Make official GitHub release which will trigger | ||
# sending the mail with link for accesss |