Skip to content

update workflow

update workflow #7

Workflow file for this run

name: npm_publish
on:
push:
branches:
- main
jobs:
bump_version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: gh-action-bump-version
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
minor-wording: "MINOR"
major-wording: "MAJOR"
patch-wording: "PATCH"
target-branch: "main"
- name: set output
# run: echo "::set-output name=commit_sha::$(git rev-parse HEAD)"
run: echo "commit_sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT"
- name: for Test
run: echo "${{needs.bump_version.outputs.commit_sha}}}}"
npm_publish:
needs: [bump_version]
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
echo "this is for Test ${{needs.bump_version.outputs.commit_sha}}}}"
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{needs.bump_version.outputs.commit_sha}}
- name: Install dependencies
run: npm install
- name: Build and Publish
run: |
npm run build
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish