enhance: Improve user mention #276
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 | |
on: | |
push: | |
branches: | |
- develop | |
- feat/** | |
- fix/** | |
- refactor/** | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use NodeJS v20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Build | |
run: | | |
# -- Build one time for release | |
yarn install --ignore-scripts | |
yarn patch-package | |
env NODE_ENV=production yarn build | |
zip -r static.zip static/ | |
# -- For artifact | |
mkdir __build/ | |
cp -r static/ __build/ | |
- name: Upload build folder as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: static | |
path: __build/ | |
if-no-files-found: error | |
retention-days: 3 | |
- name: Upload build to a release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'null2264/ghostbox' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: ./static.zip |