Create Release #5
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: Create Release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'The new version to tag, ex: x.x.x' | |
required: true | |
type: string | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create Release | |
run: | | |
set -euo pipefail | |
git config user.name "Release Workflow" | |
git config user.email "[email protected]" | |
# Archive the repository | |
COPYFILE_DISABLE=1 tar czvf "swift-bep-parser.$TAG.tar.gz" \ | |
--exclude="./bazel-*" \ | |
--exclude="user.bazelrc" \ | |
--exclude=".DS_Store" \ | |
--exclude="*.xcodeproj" \ | |
--exclude="Tests/" \ | |
--exclude="README.md" \ | |
./* | |
# Create the release notes | |
./.github/workflows/generate_release_notes.sh "$TAG" | tee notes.md | |
# Create the release | |
gh release create "$TAG" \ | |
--title "$TAG" \ | |
--target "$GITHUB_REF_NAME" \ | |
--generate-notes \ | |
--notes-file notes.md \ | |
"swift-bep-parser.$TAG.tar.gz" | |
env: | |
TAG: ${{ inputs.tag }} | |
GH_TOKEN: ${{ secrets.ACCESS_TOKEN_GITHUB }} |