-
Notifications
You must be signed in to change notification settings - Fork 2
28 lines (26 loc) · 1 KB
/
create-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
name: Create release
on:
push:
tags:
- '*'
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test files
run: ls -l && ls -l ./changelog && echo "v${GITHUB_REF/refs\/tags\//}" && ls -l ./changelog/v${GITHUB_REF/refs\/tags\//}
- name: Check if file exissts
run: echo $GITHUB_WORKSPACE/changelog/v${GITHUB_REF/refs\/tags\//}/version-summary.md
- name: Set env
run: echo "RELEASE_BODY_FILE=$(echo $GITHUB_WORKSPACE/changelog/v${GITHUB_REF/refs\/tags\//}/version-summary.md)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
# when tag has 'v' in name no need of adding it before ${GITHUB_REF/refs\/tags\//
body_path: ${{ env.RELEASE_BODY_FILE }}
env:
# Cannot use GITHUB_TOKEN because of:
# https://github.com/orgs/community/discussions/27028
GITHUB_TOKEN: ${{ secrets.LOGCHANGE_PAT_TOKEN }}