Skip to content

Merge pull request #105 from bun913/dependabot/npm_and_yarn/picomatch… #32

Merge pull request #105 from bun913/dependabot/npm_and_yarn/picomatch…

Merge pull request #105 from bun913/dependabot/npm_and_yarn/picomatch… #32

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
permissions:
contents: write
pull-requests: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Get semantic version
id: semver
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Configure Git
run: |
git config user.name 'GitHub Action'
git config user.email 'action@github.com'
- name: Update package version
run: npm version ${{ steps.semver.outputs.version }} --no-git-tag-version
- name: install
run: npm ci
- name: Upgrade npm
run: npm install -g npm@latest
- name: build
run: npm run build
- name: Publish to npm
run: npm publish --provenance --access public
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
title: "Update package version to ${{ steps.semver.outputs.version }}"
body: "Automated PR to update package version"
branch: "update-version-${{ steps.semver.outputs.version }}"
base: "main"
commit-message: "chore: Update package version to ${{ steps.semver.outputs.version }}"
add-paths: |
package.json
package-lock.json
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.semver.outputs.version }}
name: Release v${{ steps.semver.outputs.version }}
generate_release_notes: true