forked from bazel-ios/rules_ios
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (43 loc) · 1.4 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
47
48
49
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@v4
- name: Create Release
run: |
set -euo pipefail
git config user.name "Release Workflow"
git config user.email "[email protected]"
# Archive the repository
# Considerations:
# - Dont package development files (vscode config, etc)
# - Dont package the bazel-* symlink directories
# - Dont package most of the tests directory
COPYFILE_DISABLE=1 tar czvf "rules_ios.$TAG.tar.gz" \
--exclude="./.vscode" \
--exclude="./bazel-*" \
--exclude="./tests/framework" \
--exclude="./tests/ios" \
--exclude="./tests/macos" \
./*
# 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 \
"rules_ios.$TAG.tar.gz"
env:
TAG: ${{ inputs.tag }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}