Skip to content

Commit

Permalink
chore: update workflows (#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
davenewza authored Oct 27, 2023
1 parent 03eab2f commit 33dd067
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create Draft Release

on:
workflow_dispatch:
inputs:
ref:
description: "Branch, tag or SHA to release"
required: true
type: string
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: pnpm/[email protected]
with:
version: 8.5.1

- name: Checkout repository
uses: actions/checkout@v3
with:
ref: "${{ inputs.ref }}"
fetch-depth: 0

- name: Generate version
id: generate-version
uses: paulhatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "^([A-Za-z]+.)*!:.*$"
major_regexp_flags: "g"
minor_pattern: "feat"
version_format: "v${major}.${minor}.${patch}"

- name: Print release version
run: echo "NEW_VERSION=${{ steps.generate-version.outputs.version }}"

- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: "${{ steps.generate-version.outputs.version }}"
name: ${{ steps.generate-version.outputs.version }}
draft: true
makeLatest: false
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
generateReleaseNotes: true
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
token: ${{ secrets.NPM_TOKEN }}

- uses: pnpm/[email protected]
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
required: true
type: string
publishTag:
description: "NPM distribution tag"
description: "New distribution tag"
required: true
default: "latest"
type: string
Expand All @@ -32,6 +32,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
token: ${{ secrets.NPM_TOKEN }}
- name: Adding `${{ inputs.publishTag }}` tag to ${{ matrix.package }}@${{ inputs.version }}
run: npm dist-tag add @teamkeel/${{ matrix.package }}@${{ inputs.version }} ${{ inputs.publishTag }}
env:
Expand Down

0 comments on commit 33dd067

Please sign in to comment.