Skip to content

Commit cba9e3b

Browse files
committed
Fix .github/workflows/release.yml
1 parent 79f0019 commit cba9e3b

File tree

1 file changed

+38
-12
lines changed

1 file changed

+38
-12
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
--notes "Automated release for latest ${{ github.ref_name }}." \
5353
|| true
5454
55-
release_pre_built:
55+
build:
5656
needs: create_draft_release
5757
strategy:
5858
fail-fast: true
@@ -70,23 +70,49 @@ jobs:
7070
- uses: actions/checkout@v4
7171
with:
7272
fetch-depth: 50
73+
7374
- uses: ./.github/workflows/release_pre_built
7475
with:
7576
otp_version: ${{ matrix.otp_version }}
7677
otp: ${{ matrix.otp }}
7778
build_docs: ${{ matrix.build_docs }}
79+
7880
- uses: actions/attest-build-provenance@v1
7981
env:
8082
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8183
with:
8284
subject-path: 'elixir-otp-${{ matrix.otp }}.*'
85+
8386
- uses: actions/attest-build-provenance@v1
8487
if: ${{ matrix.build_docs }}
8588
env:
8689
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8790
with:
8891
subject-path: 'Docs.*'
8992

93+
- uses: actions/upload-artifact@v4
94+
with:
95+
name: elixir-otp-${{ matrix.otp }}
96+
path: elixir-otp-${{ matrix.otp }}*
97+
98+
- uses: actions/upload-artifact@v4
99+
if: ${{ matrix.build_docs }}
100+
with:
101+
name: Docs
102+
path: Docs.zip*
103+
104+
upload:
105+
needs: build
106+
runs-on: windows-2022
107+
108+
steps:
109+
- uses: actions/download-artifact@v4
110+
111+
- run: |
112+
mv elixir-otp-*/* .
113+
mv Docs/* .
114+
shell: bash
115+
90116
- name: "Sign files with Trusted Signing"
91117
if: github.repository == 'elixir-lang/elixir'
92118
uses: azure/[email protected]
@@ -104,6 +130,7 @@ jobs:
104130
timestamp-digest: SHA256
105131

106132
- name: Upload Pre-built
133+
shell: bash
107134
env:
108135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109136
run: |
@@ -113,14 +140,13 @@ jobs:
113140
tag="${{ github.ref_name }}"
114141
fi
115142
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
143+
gh release upload \
144+
--repo ${{ github.repository }} \
145+
--clobber \
146+
"$tag" \
147+
elixir-otp-*.zip \
148+
elixir-otp-*.zip.sha{1,256}sum \
149+
elixir-otp-*.exe \
150+
elixir-otp-*.exe.sha{1,256}sum \
151+
Docs.zip \
152+
Docs.zip.sha{1,256}sum

0 commit comments

Comments
 (0)