-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 1006 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
name: release
on:
release:
types:
- published
jobs:
set_version:
runs-on: ubuntu-latest
steps:
- name: Set Versions
uses: actions/github-script@v7
id: set_version
with:
script: |
const tag = context.ref.substring(10)
const no_v = tag.replace('v', '')
const dash_index = no_v.lastIndexOf('-')
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
core.setOutput('tag', tag)
core.setOutput('no-v', no_v)
core.setOutput('no-dash', no_dash)
outputs:
version: ${{ steps.set_version.outputs.no-v }}
build_deb:
needs: set_version
uses: ./.github/workflows/build-deb.yml
with:
version: ${{ needs.set_version.outputs.version }}
publish_github:
needs: [ set_version, build_deb ]
uses: ./.github/workflows/publish-to-github-releases.yml
with:
version: ${{ needs.set_version.outputs.version }}