fix: commit new lock file #100
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 | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
# The "build" job: | |
test: | |
name: 'Build and Test' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
release: | |
name: 'Release to NPM and GitHub' | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Get version from package.json before release step | |
id: initversion | |
run: echo "::set-output name=initversion::$(npm run get-version --silent)" | |
- name: 'Release to NPM and GitHub' | |
id: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GIT_AUTHOR_NAME: hex-bot | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: hex-bot | |
GIT_COMMITTER_EMAIL: [email protected] | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
run: npx semantic-release | |
- name: 'Get version from package.json after release step' | |
id: extractver | |
run: echo "::set-output name=extractver::$(npm run get-version --silent)" | |
# REMOVED FOR NOW AS NOT WORKING ON PROTECTED BRANCH | |
# - name: 'Create Pull Request with updated package files' | |
# uses: peter-evans/[email protected] | |
# with: | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# commit-message: 'chore(release): ${{ steps.extractver.outputs.version }}' | |
# committer: hex-bot <[email protected]> | |
# author: hex-bot <[email protected]> | |
# title: 'chore(release): ${{ steps.extractver.outputs.version }}' | |
# body: 'Version bump in package.json and package-lock.json for release [${{ steps.extractver.outputs.version }}](https://github.com/${{github.repository}}/releases/tag/v${{ steps.extractver.outputs.version }})' | |
# branch: version-bump/${{ steps.extractver.outputs.version }} |