-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathrelease.yml
More file actions
31 lines (29 loc) · 874 Bytes
/
release.yml
File metadata and controls
31 lines (29 loc) · 874 Bytes
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
on:
push:
branches:
- master
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
# Run on the 8th of each month
if: "endsWith(github.event.head_commit.message, '08')"
steps:
- name: Get month name
env:
LAST_COMMIT_LOG: ${{ github.event.head_commit.message }}
run: |
echo "RELEASE_VERSION=${LAST_COMMIT_LOG: -8:4}.${LAST_COMMIT_LOG: -4:2}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ format('Monthly release {0}', env.RELEASE_VERSION) }}
draft: false
prerelease: false