0.0.5 #14
Workflow file for this run
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: Release types | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: coursier/cache-action@v5 | |
#get version | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | |
# install node 14 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: install | |
run: npm install | |
- name: build & publish | |
run: | | |
npm version ${{ steps.get_version.outputs.VERSION }} --no-git-tag-version | |
npm run build | |
npm publish --access public | |
env: | |
CI: true | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions" | |
git add --all | |
git commit -am "Update package version" | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
branch: main | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# create github release | |
- name: Create a Release | |
id: create_release | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: v${{ github.ref }} | |
draft: false |