Skip to content

Commit

Permalink
Create createRelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JYC0413 authored Nov 27, 2023
1 parent 434db2f commit 2c16df7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release
on:
push:
tags:
- 'v*.*.*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Dependencies
run: |
yarn
- name: Build Project
run: |
yarn build
yarn next export
- name: Zip Export
run: |
zip -r out.zip out
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: 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: ./out.zip
asset_name: out.zip
asset_content_type: application/zip

0 comments on commit 2c16df7

Please sign in to comment.