Skip to content

Commit

Permalink
Fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Link- committed Oct 14, 2023
1 parent 9cf94dd commit e1da13c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .github/release.yml

changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Bug Fixes 🐛
labels:
- bug
- title: Chores
labels:
- dependencies
- title: Other Changes
labels:
- "*"
31 changes: 26 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
description: 'Release version'
required: true

permissions:
contents: write

jobs:
build-and-release:
runs-on: ubuntu-latest
Expand All @@ -22,7 +25,7 @@ jobs:

- name: Install dependencies
run: |
npm install
npm ci
- name: Build package
run: |
Expand All @@ -32,22 +35,40 @@ jobs:
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008
with:
author_name: Link-
author_email: [email protected]
author_email: [email protected]
message: 'Update build'
add: 'bin/starred_search'

- name: Update version
run: |
npm version ${{ github.event.inputs.name }}
npm version ${{ github.event.inputs.version }}
- name: Push new version and tag
- name: Push package.json
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008
with:
author_name: Link-
author_email: [email protected]
author_email: [email protected]
message: 'Update version'
add: 'package.json'

- name: Tag version
run: |
git tag ${{ github.event.inputs.version }}
- name: Push tag
uses: EndBug/add-and-commit@a3adef035a1381dcf888c90b847240e2ddb9e008
with:
author_name: Link-
author_email: [email protected]

- uses: actions/create-release@master
name: Create ${{ github.event.inputs.version }} Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ github.event.inputs.version }}"
release_name: "${{ github.event.inputs.version }}"

- name: Release
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939
with:
Expand Down

0 comments on commit e1da13c

Please sign in to comment.