Skip to content

Commit

Permalink
change build behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MetaverseUnknower committed Oct 29, 2023
1 parent 0c91a30 commit 169050b
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
on:
push:
branches:
- master
- main
- sdk6
- sdk7
pull_request:
release:
types:
Expand All @@ -14,18 +14,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: install
run: npm install

- name: build
run: npm run build
- name: Publish

- name: Set custom-tag for sdk6
if: github.ref == 'refs/heads/sdk6'
run: echo "CUSTOM_TAG=sdk6" >> $GITHUB_ENV

- name: Set custom-tag for sdk7
if: github.ref == 'refs/heads/sdk7'
run: echo "CUSTOM_TAG=sdk7" >> $GITHUB_ENV

- name: Publish with custom-tag
uses: menduz/oddish-action@master
with:
access: public
custom-tag: ${{ env.CUSTOM_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish sdk7 as latest
if: github.ref == 'refs/heads/sdk7'
uses: menduz/oddish-action@master
with:
# cwd: ./dist
access: public
custom-tag: latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 169050b

Please sign in to comment.