tagged-release #3
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
--- | |
name: "tagged-release" | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
tagged-release: | |
name: "Tagged Release" | |
runs-on: "ubuntu-latest" | |
steps: | |
# ... | |
- uses: actions/checkout@master | |
- name: "Make Step" | |
run: | | |
./autogen.sh | |
make dist | |
echo "done!" | |
- name: Get tar file | |
id: get-tar-name | |
run: echo "::set-output name=fileName::$(find . -type f -iname "*.tar.bz2" -printf "%f\n")" | |
- name: Fetch tar file | |
id: get-tar-path | |
uses: Rishabh510/Path-lister-action@master | |
with: | |
path: "./" | |
type: ".tar.bz2" | |
- name: Create Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
id: release-create | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
- name: Generate md5 checksum | |
uses: jmgilman/actions-generate-checksum@v1 | |
with: | |
method: md5 | |
output: md5.txt | |
patterns: ./*.tar.bz2 | |
- name: Read md5 checksum file | |
id: get-md5 | |
run: echo "::set-output name=md5::$(sed -r 's/(.{32}).*/\1/' md5.txt;cat md5.txt)" | |
- name: Generate sha1 checksum | |
uses: jmgilman/actions-generate-checksum@v1 | |
with: | |
method: sha1 | |
output: sha1.txt | |
patterns: ./*.tar.bz2 | |
- name: Read sha1 checksum file | |
id: get-sha1 | |
run: echo "::set-output name=sha1::$(sed -r 's/(.{40}).*/\1/' sha1.txt;cat sha1.txt)" | |
- name: Generate sha256 checksum | |
uses: jmgilman/actions-generate-checksum@v1 | |
with: | |
method: sha256 | |
output: sha256.txt | |
patterns: ./*.tar.bz2 | |
- name: Read sha256 checksum file | |
id: get-sha256 | |
run: echo "::set-output name=sha256::$(sed -r 's/(.{64}).*/\1/' sha256.txt;cat sha256.txt)" | |
- name: Upload Release Asset | |
id: upload-main-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release-create.outputs.upload_url }} | |
asset_path: ${{ steps.get-tar-path.outputs.paths }} | |
asset_name: ${{ steps.get-tar-name.outputs.fileName }} | |
asset_content_type: application/zip | |
- name: Update Release | |
id: update-release | |
uses: tubone24/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body: | | |
**git tag: ${{ github.ref_name }}** | |
${{ steps.upload-main-asset.outputs.browser_download_url }} | |
md5: ${{ steps.get-md5.outputs.md5 }} | |
sha1: ${{ steps.get-sha1.outputs.sha1 }} | |
sha256: ${{ steps.get-sha256.outputs.sha256 }} | |
isAppendBody: true |