Skip to content

Release commit

Release commit #2

Workflow file for this run

name: Release commit
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm test
create-release-commit:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Initalize git user email
run: git config --global user.email "${{vars.RELEASE_USER_EMAIL}}"
- name: Initalize git user name
run: git config --global user.name "Release commit workflow"
- name: Init release commit
run: npm run release -- --ci ${{github.event.release.tag_name}}
env:
GITHUB_TOKEN: ${{secrets.github_token}}