Created
May 12, 2020 10:27
-
-
Save dwdraju/b91fdba51eb2bf5996746c77b0695f1f to your computer and use it in GitHub Desktop.
Github Package Release Flow
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: git tag release and npm package publisher | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish_tag_package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Bump version and push tag | |
id: bump_version | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
RELEASE_BRANCHES: master | |
# CUSTOM_TAG: v1.12.0-rc | |
# Setup .npmrc file to publish to GitHub Packages | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@dwdraju' | |
- run: | | |
git config --global user.email "${{ github.actor }}@noreply.github.com" | |
git config --global user.name "${{ github.actor }}" | |
echo "${{ steps.bump_version.outputs.tag }}" | |
- run: npm version "${{ steps.bump_version.outputs.tag }}" && npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment