Merge pull request #37 from hredan/align_eef_target_names #13
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
# To create relases or pre-releases, push a tag with the following format: v1.0 or v1.0-prerelease | |
# git tag -a -m "Description of this release" v1.0-prerelease | |
# git push --follow-tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10-prerelease, with prerelease flag | |
name: Create Release and upload assets | |
jobs: | |
test: | |
uses: ./.github/workflows/test.yml | |
build-targets: | |
needs: test | |
uses: ./.github/workflows/build_targets.yml | |
with: | |
target: 'all' | |
release: | |
name: Create Release and upload assets | |
needs: [build-targets] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get the tag name and prerelease flag | |
run: | | |
TAG=${GITHUB_REF/refs\/tags\//} | |
if [[ ${TAG} == *"prerelease"* ]]; then | |
PRERELEASE=true | |
else | |
PRERELEASE=false | |
fi | |
# add variables to env | |
echo "TAG=${TAG}" >> $GITHUB_ENV | |
echo "PRERELEASE=${PRERELEASE}" >> $GITHUB_ENV | |
echo "TAG: ${TAG}" | |
echo "PRE: ${PRERELEASE}" | |
- name: download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: ./release | |
merge-multiple: true | |
- name: Check artifacts | |
run: | | |
cd ./release | |
ls -la | |
- name: Upload Release Assets | |
id: upload-release-assets | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ./release/* | |
draft: ${{ env.PRERELEASE }} | |
prerelease: ${{ env.PRERELEASE }} | |
generateReleaseNotes: true |