chore(deps): update softprops/action-gh-release action to v2 #62
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
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
paths: | |
- '.github/workflows/release.yml' | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: generate zip | |
run: | | |
git archive HEAD --output=compose-cd.zip | |
ls -lh compose-cd.zip | |
file compose-cd.zip | |
- name: check arvhived files | |
run: | | |
cd .. | |
mkdir archive-contents | |
cd archive-contents | |
unzip ../compose-cd/compose-cd.zip | |
tree | |
- name: generate tar.* | |
run: | | |
git config tar.tar.bz2.command bzip2 | |
git config tar.tar.bz2.command xz | |
git config tar.tar.zst.command zstd | |
git archive HEAD --output=compose-cd.tar.gz | |
git archive HEAD --output=compose-cd.tar.bz2 | |
git archive HEAD --output=compose-cd.tar.xz | |
git archive HEAD --output=compose-cd.tar.zst | |
ls -lh compose-cd.tar.* | |
file compose-cd.tar.* | |
- name: generate checksum list | |
working-directory: ../archive-contents | |
run: | | |
cp ../compose-cd/compose-cd.* . | |
ls -lh | |
md5sum ./* > ../compose-cd/md5sums.txt | |
sha1sum ./* > ../compose-cd/sha1sums.txt | |
sha256sum ./* > ../compose-cd/sha256sums.txt | |
sha512sum ./* > ../compose-cd/sha512sums.txt | |
- name: generate upload file list | |
id: upload-files | |
run: | | |
list=$(ls README.md LICENSE compose-cd* ./*sums.txt) | |
echo "${list}" | |
list="${list//$'\n'/'%0A'}" | |
echo "::set-output name=list::${list}" | |
- name: Pre Release | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'rc') | |
with: | |
draft: true | |
prerelease: true | |
generate_release_notes: false | |
files: ${{ steps.upload-files.outputs.list }} | |
- name: Release | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') && (!contains(github.ref, 'rc')) | |
with: | |
draft: false | |
prerelease: false | |
generate_release_notes: true | |
files: ${{ steps.upload-files.outputs.list }} |