Skip to content

Commit

Permalink
ci: ability to force release
Browse files Browse the repository at this point in the history
  • Loading branch information
mgibas committed Sep 30, 2022
1 parent 13c1ce2 commit 1ff88cd
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,43 @@ name: Release

on:
workflow_dispatch:
inputs:
force:
description: 'Force release'
default: false
type: boolean

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: pnpm/[email protected]
with:
version: 7.12.2
- run: pnpm i
- run: pnpm test
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: pnpm/[email protected]
with:
version: 7.12.2
- run: pnpm i
- run: pnpm test

release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v3
id: 'changelog'
with:
github-token: ${{ secrets.PAT }}
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
- uses: actions/checkout@v3
- name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v3
id: 'changelog'
with:
github-token: ${{ secrets.PAT }}
skip-on-empty: ${{ !inputs.force }}
- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

0 comments on commit 1ff88cd

Please sign in to comment.