-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.39 KB
/
deploy.yml
File metadata and controls
52 lines (45 loc) · 1.39 KB
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
name: Tag, Release, Publish
on:
push:
branches:
- master
jobs:
publish:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Tag
id: autotagger
uses: butlerlogic/action-autotag@stable
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Pre-release
if: steps.autotagger.outputs.tagname != ''
run: |
if [[ "${{ steps.autotagger.output.version }}" == *"-"* ]]; then echo "::set-env IS_PRERELEASE=true";else echo "::set-env IS_PRERELEASE=''";fi
- name: Release
id: release
if: steps.autotagger.outputs.tagname != ''
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.autotagger.outputs.tagname }}
release_name: Version ${{ steps.autotagger.outputs.version }}
body: ${{ steps.autotagger.outputs.tagmessage }}
draft: false
prerelease: env.IS_PRERELEASE != ''
- name: Publish
id: publish
if: steps.autotagger.outputs.tagname != ''
uses: author/action-publish@master
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
- name: Rollback
if: failure()
uses: author/action-rollback@stable
with:
release_id: ${{ steps.release.outputs.id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}