Skip to content

Commit

Permalink
Merge pull request #985 from fortran-lang/dependabot/github_actions/a…
Browse files Browse the repository at this point in the history
…ctions/upload-artifact-4

Bump actions/upload-artifact from 2 to 4
  • Loading branch information
gnikit authored Jun 10, 2024
2 parents f210e9d + b50244c commit 40968b1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 29 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ jobs:
rm -v ${{ env.FPM }}
echo "FPM_RELEASE=${{ env.EXE }}" >> $GITHUB_ENV
env:
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}${{ matrix.exe }}
EXE: fpm-${{ env.VERSION }}-${{ matrix.os-arch }}-gcc-${{ matrix.gcc_v }}${{ matrix.exe }}

- name: Run release version
shell: bash
run: |
ci/run_tests.sh "$PWD/${{ env.FPM_RELEASE }}"
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.FPM_RELEASE }}
path: ${{ env.FPM_RELEASE }}
Expand All @@ -192,14 +192,19 @@ jobs:
runs-on: windows-latest
needs:
- build
strategy:
fail-fast: false
matrix:
gcc_v: [10,11,12]

steps:
- uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }} # This will download all files
path: ${{ github.workspace }}
pattern: fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe

- name: Get version (normal)
if: github.event_name != 'release'
Expand Down Expand Up @@ -229,7 +234,7 @@ jobs:
- name: Fetch Windows executable
shell: msys2 {0}
run: |
cp fpm-*/fpm*.exe ./ci/fpm.exe
cp fpm-*/fpm-*-windows-*-gcc-${{ matrix.gcc_v }}.exe ./ci/fpm.exe
- name: Fetch Git for Windows
shell: msys2 {0}
Expand All @@ -254,13 +259,13 @@ jobs:
run: |
cd ./ci
makensis fpm-installer.nsi
move fpm-installer.exe fpm-installer-${{ env.VERSION }}.exe
move fpm-installer.exe fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: fpm-installer
path: ci/fpm-installer-${{ env.VERSION }}.exe
name: fpm-installer-gcc-${{ matrix.gcc_v }}
path: ci/fpm-installer-${{ env.VERSION }}-gcc-${{ matrix.gcc_v }}.exe

upload-artifacts:
if: ${{ github.event_name == 'release' && contains(github.ref, 'v') || github.event_name == 'push' }}
Expand All @@ -281,27 +286,27 @@ jobs:
if: ${{ github.event_name == 'push' }}

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }} # This will download all files
path: fpm-cd-artifacts
pattern: 'fpm-*-gcc-12*'
merge-multiple: true

- name: Normalize file names for continuous delivery
if: ${{ github.event_name == 'push' }}
run: |
for output in fpm-*/fpm*; do
pushd $(dirname "$output")
cd fpm-cd-artifacts
for output in fpm-*; do
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
popd
done
env:
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'

- name: Create SHA256 checksums
run: |
for output in fpm-*/fpm*; do
pushd $(dirname "$output")
cd fpm-cd-artifacts
for output in fpm-*; do
sha256sum $(basename "$output") | tee $(basename "$output").sha256
popd
done
- name: Move/Create continuous tag
Expand All @@ -315,7 +320,7 @@ jobs:
if: ${{ github.event_name == 'release' || steps.deploy-on-push.outputs.result != 0 }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fpm-*/fpm*
file: fpm-cd-artifacts/*
file_glob: true
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
overwrite: true
21 changes: 10 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
PREFIX: fpm-${{ env.VERSION }}/

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
${{ env.EXE }} build
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ env.OUTPUT }}
path: ${{ env.OUTPUT }}
Expand All @@ -128,27 +128,26 @@ jobs:
if: ${{ github.event_name == 'push' }}

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }} # This will download all files
path: fpm-cd-artifacts
merge-multiple: true

- name: Normalize file names for continuous delivery
if: ${{ github.event_name == 'push' }}
run: |
for output in fpm-*/fpm*; do
pushd $(dirname "$output")
cd fpm-cd-artifacts
for output in fpm-*; do
mv -v $(basename $output) $(basename $output | sed -E '${{ env.replace }}')
popd
done
env:
replace: 's/-([0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g)?[0-9a-f]+//'

- name: Create SHA256 checksums
run: |
for output in fpm-*/fpm*; do
pushd $(dirname "$output")
cd fpm-cd-artifacts
for output in fpm-*; do
sha256sum $(basename "$output") | tee $(basename "$output").sha256
popd
done
- name: Move/Create continuous tag
Expand All @@ -162,7 +161,7 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: fpm-*/fpm*
file: fpm-cd-artifacts/*
file_glob: true
tag: ${{ github.event_name == 'release' && github.ref || 'current'}}
overwrite: true

0 comments on commit 40968b1

Please sign in to comment.