-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (62 loc) · 1.88 KB
/
Copy pathrelease-drafter.yml
File metadata and controls
71 lines (62 loc) · 1.88 KB
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
62
63
64
65
66
67
68
69
70
71
name: Release Drafter
on:
workflow_dispatch:
inputs:
version:
description: Release version without the leading "v"
required: false
type: string
push:
branches: [ main ]
permissions:
contents: write
pull-requests: read
id-token: write
attestations: write
artifact-metadata: write
jobs:
update-release-draft:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.release_drafter.outputs.tag_name }}
html_url: ${{ steps.release_drafter.outputs.html_url }}
steps:
- name: Update release draft
id: release_drafter
uses: release-drafter/release-drafter@v7
with:
config-name: release-drafter.yml
version: ${{ github.event_name == 'workflow_dispatch' && inputs.version || '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: update-release-draft
uses: ./.github/workflows/publish-artifacts.yml
with:
package_version: ${{ needs.update-release-draft.outputs.tag_name }}
upload-release-assets:
name: Upload artifacts to release draft
runs-on: ubuntu-latest
needs:
- update-release-draft
- publish
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Download published artifacts
uses: actions/download-artifact@v6
with:
pattern: ModularityKit-packages
path: dist
merge-multiple: true
- name: Upload assets to Release Drafter draft
env:
GITHUB_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
RELEASE_TAG: ${{ needs.update-release-draft.outputs.tag_name }}
DIST_DIR: dist
ENSURE_DRAFT: "true"
FAIL_MESSAGE: "Release Drafter did not return a tag name."
ASSET_PATTERNS: |
*
run: python3 -m scripts.releases.upload_release_assets