Skip to content

Commit

Permalink
ci: fix CD artefact creation
Browse files Browse the repository at this point in the history
  • Loading branch information
gnikit committed Jun 9, 2024
1 parent 02c62bc commit 10ca214
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,26 +288,24 @@ jobs:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}
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 @@ -321,7 +319,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

0 comments on commit 10ca214

Please sign in to comment.