-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
42 lines (36 loc) · 1.59 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# https://github.com/actions/create-release
# https://github.com/vitejs/vite/blob/main/.github/workflows/release-tag.yml
name: Release
on:
push:
tags:
- '@videojs-player/*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# `%@*` truncates @ and version number from the right side.
# https://stackoverflow.com/questions/9532654/expression-after-last-specific-character
# https://www.edwardthomson.com/blog/github_actions_15_sharing_data_between_steps.html
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-setting-an-output-parameter
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
# GITHUB_REF_NAME === The branch or tag name that triggered the workflow run. For example, `@videojs-player/[email protected]`.
# MARK: package dir should not be coupled with package name. `@videojs-player/[email protected]` > `vue`
# - name: Get package name for tag
# id: tag
# run: |
# pkgDirName=${GITHUB_REF_NAME%@*}
# echo "::set-output name=pkgDirName::$pkgDirName"
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
Please refer to [CHANGELOG.md](https://github.com/surmon-china/videojs-player#changelog) for details.