-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (46 loc) · 1.37 KB
/
cd.yaml
File metadata and controls
46 lines (46 loc) · 1.37 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
name: CD
on:
push:
branches:
- main
permissions: {}
jobs:
ci:
# actions/attest-build-provenance requires these permissions
permissions:
id-token: write
attestations: write
uses: GiganticMinecraft/ObserverUtils/.github/workflows/ci.yaml@main
cd:
name: Release
runs-on: ubuntu-24.04
needs:
- ci
# softprops/action-gh-release requires this permisson
permissions:
contents: write
timeout-minutes: 5
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Output SHA
uses: hudsonm62/short-sha@b5ee0a4109da599fea68b00dcfe5812100ad8d42 # v1.1.0
id: short-sha
- name: Download artifacts
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
- name: Create and push a tag
id: tag-name
run: |
TAG_NAME="sha-${SHA}"
git tag "$TAG_NAME"
git push origin "$TAG_NAME"
echo "value=$TAG_NAME" >> "$GITHUB_OUTPUT"
echo "$TAG_NAME"
env:
SHA: ${{ steps.short-sha.outputs.sha }}
- name: Create release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2
with:
tag_name: ${{ steps.tag-name.outputs.value }}
draft: false
prerelease: true
files: artifact/*.jar