chore: updating major for peers #39
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: Node.js Package | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
publish-dev: | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@tfso' | |
- name: Install | |
run: npm install conventional-changelog-conventionalcommits@^4.6.0 | |
- name: Conventional Changelog Action | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v3 | |
with: | |
git-push: false | |
skip-commit: true | |
skip-git-pull: true | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
config-file-path: ./changelog-config.js | |
- name: Fail if tagging is skipped | |
if: ${{ steps.changelog.outputs.skipped == 'true' }} | |
run: exit 1 | |
- name: Fix package name | |
run: sed -i -e 's/"eslint-config-tfso"/"\@tfso\/eslint-config"/g' package.json | |
- name: Publish prerelease to GitHub Packages | |
run: | | |
npm version prerelease --preid=branch-${{ github.event.number }}.${{ github.run_number }} --no-git-tag-version | |
npm publish --verbose --tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-prod: | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '14.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@tfso' | |
- name: Install | |
run: npm install conventional-changelog-conventionalcommits@^4.6.0 | |
# Creates tags and updates changelog based on change changelog-config.js settings | |
- name: Conventional Changelog Action | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v3 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
config-file-path: ./changelog-config.js | |
- name: Fail if tagging is skipped | |
if: ${{ steps.changelog.outputs.skipped == 'true' }} | |
run: exit 1 | |
- name: Fix package name | |
run: sed -i -e 's/"eslint-config-tfso"/"\@tfso\/eslint-config"/g' package.json | |
- name: Publish to Github Packages | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |