Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisanku committed May 12, 2023
1 parent cd1843b commit ace3eb4
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
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

0 comments on commit ace3eb4

Please sign in to comment.