-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
download all artifacts in one go, use same action for real release
- Loading branch information
Showing
1 changed file
with
13 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|
@@ -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: | ||
|
@@ -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 }} |