Skip to content

Commit

Permalink
download all artifacts in one go, use same action for real release
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Mar 5, 2021
1 parent 893ed16 commit 9b01419
Showing 1 changed file with 13 additions and 46 deletions.
59 changes: 13 additions & 46 deletions .github/workflows/build-test-release-client-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,56 +296,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Download Deb package
uses: actions/download-artifact@v2
with:
name: Deb package

- name: Download RPM package
uses: actions/download-artifact@v2
with:
name: RPM package

- name: Download tar package
uses: actions/download-artifact@v2
with:
name: Tar package

- name: Download macOS package
uses: actions/download-artifact@v2
- uses: actions/download-artifact@v2
with:
name: macOS package
path: ./build_artifacts

- name: Find filenames of downloaded packages
id: find_filenames
shell: bash
run: |
rpmfile="$(ls -1 cvmfs-config-eessi*.rpm)"
debfile="$(ls -1 cvmfs-config-eessi*.deb)"
pkgfile="$(ls -1 cvmfs-config-eessi*.pkg)"
tarfile="$(ls -1 cvmfs-config-eessi*.tar)"
echo ::set-output name=rpmfile::${rpmfile}
echo ::set-output name=debfile::${debfile}
echo ::set-output name=pkgfile::${pkgfile}
echo ::set-output name=tarfile::${tarfile}
run: echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*)

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Filesystem Layer ${{ github.ref }}
draft: false
prerelease: false

- name: Upload all assets
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: meeDamian/[email protected]
with:
asset_paths: '["./cvmfs-config-eessi*"]'
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
name: Filesystem Layer ${{ github.ref }}
body: >
Filesystem Layer release ${{ github.ref }}
files: ${{ steps.find_filenames.outputs.package_filenames }}

- name: Delete any previous tag/release named "latest"
uses: dev-drprasad/[email protected]
Expand All @@ -359,8 +326,8 @@ jobs:
id: rename_files
run: |
sudo apt-get install rename
rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ./cvmfs-config-eessi*
echo ::set-output name=packages::$(ls -1 cvmfs-config-eessi*latest*)
rename "s/([0-9]+.[0-9]+.[0-9]+)(-[0-9]+)?/latest/g" ${{ steps.find_filenames.outputs.package_filenames }}
echo ::set-output name=package_filenames::$(ls -1 -R ./build_artifacts/cvmfs-config-eessi*latest*)
- uses: meeDamian/[email protected]
with:
Expand All @@ -371,4 +338,4 @@ jobs:
This is a moving release that always points to the latest release.
It allows you to easily download the assets.
gzip: false
files: ${{ steps.rename_files.outputs.packages }}
files: ${{ steps.rename_files.outputs.package_filenames }}

0 comments on commit 9b01419

Please sign in to comment.