@@ -43,16 +43,19 @@ jobs:
43
43
if : github.ref_type == 'branch'
44
44
run : |
45
45
ref_name=${{ github.ref_name }}-latest
46
+
47
+ if ! gh release view $ref_name; then
48
+ gh release create \
49
+ --latest=false \
50
+ --title $ref_name \
51
+ --notes "Automated release for latest ${{ github.ref_name }}." \
52
+ $ref_name
53
+ fi
54
+
46
55
git tag $ref_name --force
47
56
git push origin $ref_name --force
48
- gh release create \
49
- $ref_name \
50
- —-latest=false \
51
- --title $ref_name \
52
- --notes "Automated release for latest ${{ github.ref_name }}." \
53
- || true
54
57
55
- release_pre_built :
58
+ build :
56
59
needs : create_draft_release
57
60
strategy :
58
61
fail-fast : true
@@ -70,23 +73,49 @@ jobs:
70
73
- uses : actions/checkout@v4
71
74
with :
72
75
fetch-depth : 50
76
+
73
77
- uses : ./.github/workflows/release_pre_built
74
78
with :
75
79
otp_version : ${{ matrix.otp_version }}
76
80
otp : ${{ matrix.otp }}
77
81
build_docs : ${{ matrix.build_docs }}
82
+
78
83
- uses : actions/attest-build-provenance@v1
79
84
env :
80
85
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
86
with :
82
87
subject-path : ' elixir-otp-${{ matrix.otp }}.*'
88
+
83
89
- uses : actions/attest-build-provenance@v1
84
90
if : ${{ matrix.build_docs }}
85
91
env :
86
92
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
87
93
with :
88
94
subject-path : ' Docs.*'
89
95
96
+ - uses : actions/upload-artifact@v4
97
+ with :
98
+ name : elixir-otp-${{ matrix.otp }}
99
+ path : elixir-otp-${{ matrix.otp }}*
100
+
101
+ - uses : actions/upload-artifact@v4
102
+ if : ${{ matrix.build_docs }}
103
+ with :
104
+ name : Docs
105
+ path : Docs.zip*
106
+
107
+ upload :
108
+ needs : build
109
+ runs-on : windows-2022
110
+
111
+ steps :
112
+ - uses : actions/download-artifact@v4
113
+
114
+ - run : |
115
+ mv elixir-otp-*/* .
116
+ mv Docs/* .
117
+ shell: bash
118
+
90
119
- name : " Sign files with Trusted Signing"
91
120
if : github.repository == 'elixir-lang/elixir'
92
121
@@ -104,6 +133,7 @@ jobs:
104
133
timestamp-digest : SHA256
105
134
106
135
- name : Upload Pre-built
136
+ shell : bash
107
137
env :
108
138
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109
139
run : |
@@ -113,14 +143,13 @@ jobs:
113
143
tag="${{ github.ref_name }}"
114
144
fi
115
145
116
- gh release upload --clobber "$tag" \
117
- elixir-otp-${{ matrix.otp }}.zip \
118
- elixir-otp-${{ matrix.otp }}.zip.sha{1,256}sum \
119
- elixir-otp-${{ matrix.otp }}.exe \
120
- elixir-otp-${{ matrix.otp }}.exe.sha{1,256}sum
121
-
122
- if [ "${{ matrix.build_docs }}" == "build_docs" ]; then
123
- gh release upload --clobber "$tag" \
124
- Docs.zip \
125
- Docs.zip.sha{1,256}sum
126
- fi
146
+ gh release upload \
147
+ --repo ${{ github.repository }} \
148
+ --clobber \
149
+ "$tag" \
150
+ elixir-otp-*.zip \
151
+ elixir-otp-*.zip.sha{1,256}sum \
152
+ elixir-otp-*.exe \
153
+ elixir-otp-*.exe.sha{1,256}sum \
154
+ Docs.zip \
155
+ Docs.zip.sha{1,256}sum
0 commit comments