Publish Release #18
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: Publish Release | |
on: | |
push: | |
tags: | |
- '*il*' | |
jobs: | |
build: | |
name: Publish Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Submodules | |
run: git submodule update --init . | |
- name: Patch | |
run: GPATCH=patch ./build -p | |
- name: Set version string | |
id: version | |
run: | | |
echo "GITHUB_REPOSITORY = $GITHUB_REPOSITORY" | |
echo "GITHUB_REF = $GITHUB_REF" | |
echo "::set-output name=v::${GITHUB_REPOSITORY##*/}-${GITHUB_REF##*/}" | |
echo "::set-output name=b::${GITHUB_REF##*/}" | |
- name: Create archive | |
run: tar cvf release.tar --owner=root --group=root --exclude '.git*' --exclude .azurepipelines --transform 's^.^${{ steps.version.outputs.v }}^' --show-stored-names . | |
- name: Compress | |
run: | | |
gzip -9vc release.tar > release.tar.gz | |
bzip2 -9vc release.tar > release.tar.bz2 | |
xz -9vc release.tar > release.tar.xz | |
sha256sum release.tar.gz > release.tar.gz.sha256 | |
sha256sum release.tar.bz2 > release.tar.bz2.sha256 | |
sha256sum release.tar.xz > release.tar.xz.sha256 | |
- name: Create release | |
id: create_release | |
uses: elgohr/Github-Release-Action@v5 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
title: Release ${{ steps.version.outputs.b }} | |
tag: ${{ steps.version.outputs.b }} | |
prerelease: false | |
- name: Upload gz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.gz | |
asset_name: ${{ steps.version.outputs.v }}.tar.gz | |
asset_content_type: application/gzip | |
- name: Upload gz checksum | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.gz.sha256 | |
asset_name: ${{ steps.version.outputs.v }}.tar.gz.sha256 | |
asset_content_type: text/plain | |
- name: Upload bz2 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.bz2 | |
asset_name: ${{ steps.version.outputs.v }}.tar.bz2 | |
asset_content_type: application/bzip2 | |
- name: Upload bz2 checksum | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.bz2.sha256 | |
asset_name: ${{ steps.version.outputs.v }}.tar.bz2.sha256 | |
asset_content_type: text/plain | |
- name: Upload xz | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.xz | |
asset_name: ${{ steps.version.outputs.v }}.tar.xz | |
asset_content_type: application/xz | |
- name: Upload xz checksum | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release.tar.xz.sha256 | |
asset_name: ${{ steps.version.outputs.v }}.tar.xz.sha256 | |
asset_content_type: text/plain | |