Skip to content

chore: Create action to automate tag and release with merge to main #39

chore: Create action to automate tag and release with merge to main

chore: Create action to automate tag and release with merge to main #39

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install setuptools
if: ${{ matrix.os == 'macos-latest' }}
run: sudo -H pip install setuptools
- run: npm install
- run: npm test
test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm run test:windows
tag_release:
runs-on: ubuntu-latest
if: github.ref_name == github.event.repository.default_branch
steps:
- name: Create tag
uses: mathieudutour/github-tag-action@v6.1
id: tag_version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
uses: ncipollo/release-action@v1.14.0
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_version }}
body: ${{ steps.tag_version.outputs.changelog }}