Skip to content

Create release

Create release #4

Workflow file for this run

name: Create release
on:
workflow_dispatch:
inputs:
draft:
type: boolean
jobs:
build:
uses: ./.github/workflows/ci.yml
version:
outputs:
version: ${{ steps.version.outputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: version
run: |
version=$(cat bikeshed/semver.txt)
echo "version=$version" >> "$GITHUB_OUTPUT"
gh-release-create:
needs: [build, version]
permissions:
contents: write
runs-on: ubuntu-latest
env:
version: ${{ needs.version.outputs.version }}
steps:
- uses: actions/download-artifact@v4
with:
name: bikeshed-linux_x86_64
- uses: actions/download-artifact@v4
with:
name: bikeshed-macosx_10_9_x86_64
- uses: actions/download-artifact@v4
with:
name: bikeshed-macosx_11_0_arm64
- uses: actions/download-artifact@v4
with:
name: bikeshed-win_amd64
- uses: actions/download-artifact@v4
with:
name: bikeshed-ape
# https://github.com/actions/upload-artifact/issues/38
- run: chmod +x bikeshed-linux_x86_64-$version/bikeshed
- run: chmod +x bikeshed-macosx_10_9_x86_64-$version/bikeshed
- run: chmod +x bikeshed-macosx_11_0_arm64-$version/bikeshed
- run: chmod +x bikeshed-ape-$version/bikeshed
- run: tar czf bikeshed-linux_x86_64-$version.tar.gz bikeshed-linux_x86_64-$version
- run: tar czf bikeshed-macosx_10_9_x86_64-$version.tar.gz bikeshed-macosx_10_9_x86_64-$version
- run: tar czf bikeshed-macosx_11_0_arm64-$version.tar.gz bikeshed-macosx_11_0_arm64-$version
- run: zip -r bikeshed-win_amd64-$version.zip bikeshed-win_amd64-$version
- run: zip -r bikeshed-ape-$version.zip bikeshed-ape-$version
- env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
gh release create "v$version" \
${{ (inputs.draft && '--draft') || '' }} \
--generate-notes \
bikeshed-linux_x86_64-$version.tar.gz \
bikeshed-macosx_10_9_x86_64-$version.tar.gz \
bikeshed-macosx_11_0_arm64-$version.tar.gz \
bikeshed-win_amd64-$version.zip \
bikeshed-ape-$version.zip