generated from mattrobmattrob/bazel-ios-swiftui-template
-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (40 loc) · 1.25 KB
/
create_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 }}