-
Notifications
You must be signed in to change notification settings - Fork 65
66 lines (58 loc) · 1.91 KB
/
publish-create-tutorial.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Prepare create-tutorial Release PR
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish, e.g. 0.0.1'
required: true
default: '0.0.1'
type: string
push:
branches:
- main
paths:
- 'packages/create-tutorial/package.json'
jobs:
prepare_release_create_tutorial:
name: Prepare Release PR
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-and-build
- name: Bump versions
run: >
pnpm --recursive
--filter "create-tutorial"
exec pnpm version --no-git-tag-version --allow-same-version ${{ inputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
with:
commit-message: 'chore: release `create-tutorial` v${{ inputs.version }}'
title: 'chore: release `create-tutorial` v${{ inputs.version }}'
body: 'Bump `create-tutorial` to version ${{ inputs.version }}.'
reviewers: SamVerschueren,d3lm,Nemikolh,AriPerkkio
branch: chore/release-create-tutorial-${{ inputs.version }}
publish_release_create_tutorial:
name: Publish Release create-tutorial
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
if: ${{ contains(github.event.head_commit.message, 'release `create-tutorial`') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-and-build
- name: Publish to npm
run: >
pnpm --recursive
--filter create-tutorial
exec pnpm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}