-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 1.01 KB
/
release.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
name: Release the package on merge into main
# Only trigger when a pull request into main branch is closed.
on:
pull_request:
types: [closed]
branches:
- main
jobs:
release:
# This job will only run if the PR has been merged (and not closed without merging).
if: "github.event.pull_request.merged == true && !contains(github.event.pull_request.head.message, 'skip_ci_release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get package version
run: echo "PACKAGE_VERSION=$(echo "$(npm version --json)" | jq --raw-output '.["planex-site"]')" >> $GITHUB_ENV
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own.
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
draft: false
prerelease: false