fluence-js/.github/workflows/release.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

name: "release"
on:
push:
tags:
- "v*"
jobs:
npm-publish:
name: "Publish"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
### Set version
- name: Set version to ${{ env.RELEASE_VERSION }}
2021-09-08 09:21:11 +00:00
run: npm version --new-version --allow-same-version ${{ env.RELEASE_VERSION }} --no-git-tag-version
### Publish to NPM registry
- uses: actions/setup-node@v1
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
### Create a release
- name: Build Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: ".github/workflows/changelog_config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
id: release
uses: softprops/action-gh-release@v1
with:
2021-09-27 19:11:35 +00:00
name: Fluence JS ${{ env.RELEASE_VERSION }}
tag_name: ${{ env.RELEASE_VERSION }}
body: ${{steps.changelog.outputs.changelog}}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}