-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.92 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
on:
workflow_dispatch:
inputs:
version:
description: The version to release. Do not include "v".
type: string
required: true
draft:
type: boolean
default: true
description: ''
required: false
jobs:
build:
permissions:
contents: read
uses: ./.github/workflows/_build.yml
with:
version: ${{ github.event.inputs.version }}
test:
permissions:
contents: read
needs: [build]
uses: ./.github/workflows/_test.yml
with:
artifact-bin: ${{ needs.build.outputs.artifact-bin }}
artifact-msi: ${{ needs.build.outputs.artifact-msi }}
release:
needs: [build, test]
runs-on: ubuntu-latest
permissions:
contents: write
discussions: write
steps:
- name: Retrieve artifacts
id: artifact
uses: actions/download-artifact@v3
with:
path: .artifact
- name: Zip up bin files
working-directory: ${{ steps.artifact.outputs.download-path }}/${{ needs.build.outputs.artifact-bin }}
shell: bash
run: zip -r ccgvault_v${{ github.event.inputs.version }}_x64.zip .
- name: Release
# https://github.com/softprops/action-gh-release/commit/fe9a9bd3295828558c7a3c004f23f3bf77d155b2
uses: softprops/action-gh-release@fe9a9bd3295828558c7a3c004f23f3bf77d155b2
with:
tag_name: v${{ github.event.inputs.version }}
fail_on_unmatched_files: true
discussion_category_name: Announcements
generate_release_notes: true
draft: ${{ github.event.inputs.draft }}
files: |
${{ steps.artifact.outputs.download-path }}/${{ needs.build.outputs.artifact-bin }}/ccgvault_v${{ github.event.inputs.version }}_x64.zip
${{ steps.artifact.outputs.download-path }}/${{ needs.build.outputs.artifact-msi }}/ccgvault_v${{ github.event.inputs.version }}_x64.msi