ci: rename ci #6
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
# This Action should run on main branch and verify lint, test, and then publish the version on npm | |
name: CD | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: SelfManagement | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Configure CI Git User | |
run: | | |
git config user.name vtexgithubbot | |
git config user.email [email protected] | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Update version to patch | |
run: yarn version --patch | |
- name: Publish | |
run: yarn publish --non-interactive | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Push changes and tags | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "vtexgithubbot" | |
git push --follow-tags |