-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1013 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
34
35
36
37
38
39
name: Release action-hugo
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
release:
outputs:
version: ${{ steps.cleanup.outputs.version }}
name: Create action-hugo release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
- name: Create action-hugo release
id: create_release
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Release for Hugo version ${{ github.ref }}
- id: cleanup
name: Cleanup build branch
run: |
VERSION=$(cat BUILD_VERSION)
git config --global user.email "github@utahcon.com"
git config --global user.name "Adam Barrett"
git push origin :refs/tags/build-${VERSION} || true
git push origin :build-${VERSION} || true