-
Notifications
You must be signed in to change notification settings - Fork 273
58 lines (50 loc) · 1.34 KB
/
pre-release.yaml
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
53
54
55
56
57
58
name: pre-release
run-name: pre-release ${{inputs.version}}
defaults:
run:
shell: bash
on:
workflow_run:
workflows: ["CI"]
branches: [trunk]
types:
- completed
workflow_dispatch:
inputs:
tag:
description: specify the tag name for the release
required: false
jobs:
bundle-ucm:
name: build and bundle ucm
uses: ./.github/workflows/bundle-ucm.yaml
with:
ref: ${{ github.ref }}
release:
name: create release
runs-on: ubuntu-20.04
needs:
- bundle-ucm
steps:
- name: make download dir
run: mkdir /tmp/ucm
- name: "download artifacts"
uses: actions/download-artifact@v4
with:
path: /tmp/ucm
- name: derive release tag
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "ref_name=${{ github.event.inputs.tag }}"
else
echo "ref_name=$(echo ${{ github.ref_name }} | awk -F'/' '{print $NF}')"
fi
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ env.ref_name }}-build
prerelease: true
title: Development Build (${{ env.ref_name }})
files: |
/tmp/ucm/**/ucm-*.tar.gz
/tmp/ucm/**/ucm-*.zip