Skip to content

Publish releases.

Publish releases. #1

Workflow file for this run

name: GitHub Release
on:
push:
tags:
- v*
jobs:
Publish:
permissions:
contents: write
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
# We'd use `github.event.head_commit.message`, but that includes the first line of the message. So we check out the code.
- name: Check out code for release body calculation using `git` itself
uses: actions/checkout@v4
- name: Calculate release name
run: |
GITHUB_REF=${{ github.ref }}
RELEASE_NAME=${GITHUB_REF#"refs/tags/"}
echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
- name: Calculate release body
run: |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "RELEASE_BODY<<$EOF" >> $GITHUB_ENV
git log --format=%b -n 1 HEAD >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: Publish release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.RELEASE_NAME }}
body: ${{ env.RELEASE_BODY }}
draft: false
prerelease: false
upload-build:
needs: create-release

Check failure on line 42 in .github/workflows/github-release.yaml

View workflow run for this annotation

GitHub Actions / GitHub Release

Invalid workflow file

The workflow is not valid. .github/workflows/github-release.yaml (Line: 42, Col: 12): Job 'upload-build' depends on unknown job 'create-release'.
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: mak
zip: all
token: ${{ secrets.GITHUB_TOKEN }}