Skip to content

chore: bump semver from 5.7.1 to 5.7.2 (#167) #94

chore: bump semver from 5.7.1 to 5.7.2 (#167)

chore: bump semver from 5.7.1 to 5.7.2 (#167) #94

Workflow file for this run

name: Publish package
on:
push:
branches:
- master
jobs:
publish:
name: Build and Publish
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore: release v')"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- name: Fix up git URLs
run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig
# Checkout the repo
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
token: ${{ secrets.GH_TOKEN }}
# Configure git
- name: Configure CI Git User
run: |
git config --global user.name "${{github.event.head_commit.author.name}}"
git config --global user.email "${{github.event.head_commit.author.email}}"
git remote set-url origin https://$GITHUB_ACTOR:$GH_TOKEN@github.com/ContaAzul/creditcard.js
# Setup Node.js build environment
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
# Cache dependencies
- name: Cache Dependencies
uses: actions/cache@v2
id: cache
with:
path: |
**/node_modules
key: yarn-${{ hashFiles('**/package.json', 'yarn.lock') }}
# Install project dependencies
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn
# Build the project
- name: Build
run: yarn build
# Authenticate to NPM
- name: Authenticate with Registry
run: |
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
# Release and publish version
- name: Release version
run: NPM_TOKEN="${{ secrets.NPM_TOKEN }}" yarn release --ci --npm.skipChecks