-
Notifications
You must be signed in to change notification settings - Fork 70
52 lines (48 loc) · 1.33 KB
/
release_and_publish.yml
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
# from https://dev.to/puku0x/github-actions-1mi5
name: Release
on:
pull_request:
branches:
- master
types: [closed]
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'bump-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version
id: get_version
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: echo ::set-output name=VERSION::${HEAD_REF#bump-v}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.VERSION }}
release_name: v${{ steps.get_version.outputs.VERSION }}
body: |+
## Bug fixes
-
## Features
-
## BREAKING CHANGES
-
draft: false
prerelease: false
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install yarn
run: npm install -g yarn
- name: Publish package
run: |
yarn install
pushd serverless-s3-local
yarn publish
popd
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}