-
Notifications
You must be signed in to change notification settings - Fork 28
44 lines (39 loc) · 1.26 KB
/
pre-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
40
41
42
43
44
name: Create Pre-release
on:
push:
branches:
- main
jobs:
create-pre-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get commit info
id: commit_info
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "commit_message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
# Generating a GitHub token, so that tags created by the action
# triggers the other workflows
- name: Generate GitHub token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.WEBB_SPIDER_APP_ID }}
private-key: ${{ secrets.WEBB_SPIDER_PRIV_KEY }}
- name: Create pre-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
with:
tag_name: ${{ steps.commit_info.outputs.sha_short }}
release_name: Tangle Pre-release ${{ steps.commit_info.outputs.sha_short }}
body: |
Commit: ${{ steps.commit_info.outputs.commit_message }}
draft: false
prerelease: true