Bump VERSION to 2.2.0 #10
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 | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
package: | |
runs-on: ubuntu-latest | |
outputs: | |
filename: ${{ steps.get_name.outputs.NEW_FILE_NAME }} | |
shasum: ${{ steps.shasum.outputs.SHA256_SUM }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run package.sh | |
run: | | |
chmod +x bin/package.sh | |
./bin/package.sh | |
- name: Find new tar.xz file | |
id: get_name | |
run: | | |
NEW_FILE_NAME=$(git ls-files --others --exclude-standard | grep '\.tar\.xz$') | |
echo "NEW_FILE_NAME=$NEW_FILE_NAME" >> $GITHUB_OUTPUT | |
- name: Calculate SHA256 | |
id: shasum | |
run: | | |
echo "SHA256_SUM=$(shasum -a 256 ${{ steps.get_name.outputs.NEW_FILE_NAME }} | awk '{ print $1 }')" >> $GITHUB_OUTPUT | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-files | |
path: | | |
${{ steps.get_name.outputs.NEW_FILE_NAME }} | |
release: | |
needs: package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-files | |
- name: Create draft release | |
run: | | |
VERSION=$(cat VERSION) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
gh release create $VERSION --draft --title "Release $VERSION" --notes "SHA256: ${{ needs.package.outputs.shasum }}" --repo ${{ github.repository }} *.tar.xz | |
env: | |
GH_TOKEN: ${{ github.token }} |