Skip to content

Commit

Permalink
add build action for setting latest
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaverseUnknower committed Oct 18, 2024
1 parent 47c498a commit 58b9015
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on:
push:
branches:
- sdk7
pull_request:
release:
types:
- created

name: Publish NPM package
jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: install
run: npm install
- name: build
run: npm run build
- name: Publish
uses: menduz/oddish-action@master
with:
# cwd: ./dist
access: public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

tag_latest:
runs-on: ubuntu-latest
needs: install
if: github.event_name == 'release'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Tag latest branch
run: |
git fetch --all
git checkout sdk7
TAG_NAME="latest"
git tag -f $TAG_NAME
git push origin -f $TAG_NAME

0 comments on commit 58b9015

Please sign in to comment.