forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (42 loc) · 1.5 KB
/
release_publish_extended_services.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
45
46
47
name: "Release :: Publish (Extended Services)"
on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
description: "Tag associated with the release"
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
upload_asset_url: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).upload_url }}
release_ref: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).target_commitish }}
steps:
- name: "Fetch release for ${{ github.event.inputs.tag }}"
uses: octokit/[email protected]
id: fetch_release_for_tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
route: GET /repos/{repo}/releases/tags/{tag}
repo: ${{ github.repository }}
tag: ${{ github.event.inputs.tag }}
- name: "Checkout"
uses: actions/checkout@v3
with:
ref: ${{ fromJSON(steps.fetch_release_for_tag.outputs.data).target_commitish }}
- name: "Check `tag` against `(package.json).version`"
shell: bash
run: |
[ "${{ github.event.inputs.tag }}" == "$(node -p "require('./package.json').version")" ]
build_and_publish:
needs: [prepare]
uses: ./.github/workflows/release_build_extended_services.yml
with:
dry_run: false
base_ref: ${{ needs.prepare.outputs.release_ref }}
tag: ${{ github.event.inputs.tag }}
upload_asset_url: ${{ needs.prepare.outputs.upload_asset_url }}
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}