-
Notifications
You must be signed in to change notification settings - Fork 19
33 lines (28 loc) · 984 Bytes
/
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
name: Tag release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get package version
id: package_version
run: echo "::set-output name=package-version::v$(jq -r ".version" package.json)"
- name: Check if version tag already exists
id: version_tag
uses: mukunku/tag-exists-action@9298fbcc409758ba624a0ae16b83df86637cb8ce
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ steps.package_version.outputs.package-version }}
- name: Create GitHub release
if: ${{ steps.version_tag.outputs.exists == 'false' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.DM_GITHUB_TOKEN }}
with:
tag_name: ${{ steps.package_version.outputs.package-version }}
release_name: Release ${{ steps.package_version.outputs.package-version }}