ci: Bump actions/upload-artifact to v4

v3 is deprecated:
https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
This commit is contained in:
Tomas Janousek 2024-05-21 21:44:29 +01:00
parent b57212cc18
commit 7109b0ce8f
2 changed files with 19 additions and 9 deletions

View File

@ -56,19 +56,24 @@ set in GitHub repository secrets.
- name: unconstrained build - name: unconstrained build
run: | run: |
rm -f cabal.project.local rm -f cabal.project.local
@@ -267,3 +279,75 @@ @@ -267,3 +279,80 @@
with: with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store path: ~/.cabal/store
+ - name: upload artifacts (sdist) + # must be separate artifacts because GitHub Actions are still broken:
+ # https://github.com/actions/upload-artifact/issues/441
+ # https://github.com/actions/upload-artifact/issues/457
+ - name: upload artifact (sdist)
+ if: matrix.upload + if: matrix.upload
+ uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4
+ with: + with:
+ name: sdist
+ path: ${{ github.workspace }}/sdist/*.tar.gz + path: ${{ github.workspace }}/sdist/*.tar.gz
+ - name: upload artifacts (haddock) + - name: upload artifact (haddock)
+ if: matrix.upload + if: matrix.upload
+ uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4
+ with: + with:
+ name: haddock
+ path: ${{ github.workspace }}/haddock/*-docs.tar.gz + path: ${{ github.workspace }}/haddock/*-docs.tar.gz
+ - name: hackage upload (candidate) + - name: hackage upload (candidate)
+ if: matrix.upload && github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' + if: matrix.upload && github.event_name == 'workflow_dispatch' && github.event.inputs.version != ''

View File

@ -253,15 +253,20 @@ jobs:
with: with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store path: ~/.cabal/store
- name: upload artifacts (sdist) # must be separate artifacts because GitHub Actions are still broken:
# https://github.com/actions/upload-artifact/issues/441
# https://github.com/actions/upload-artifact/issues/457
- name: upload artifact (sdist)
if: matrix.upload if: matrix.upload
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: sdist
path: ${{ github.workspace }}/sdist/*.tar.gz path: ${{ github.workspace }}/sdist/*.tar.gz
- name: upload artifacts (haddock) - name: upload artifact (haddock)
if: matrix.upload if: matrix.upload
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: haddock
path: ${{ github.workspace }}/haddock/*-docs.tar.gz path: ${{ github.workspace }}/haddock/*-docs.tar.gz
- name: hackage upload (candidate) - name: hackage upload (candidate)
if: matrix.upload && github.event_name == 'workflow_dispatch' && github.event.inputs.version != '' if: matrix.upload && github.event_name == 'workflow_dispatch' && github.event.inputs.version != ''