File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ readonly swift_version=$1
6
+ readonly macos_archive=$2
7
+
8
+ readonly upstream_url=" https://github.com/swiftlang/llvm-project/releases/tag/swift-$swift_version -RELEASE"
9
+
10
+ macos_sha=$( shasum -a 256 " $macos_archive " )
11
+
12
+ cat << EOF
13
+ The binary included with this release was built against Swift $swift_version at [this tag]($upstream_url ).
14
+
15
+ sha256:
16
+ \`\`\`
17
+ $macos_sha
18
+ \`\`\`
19
+ EOF
Original file line number Diff line number Diff line change 2
2
push :
3
3
branches : [main]
4
4
pull_request :
5
+ workflow_dispatch :
6
+ inputs :
7
+ tag :
8
+ description : ' The new version to tag, ex: 1.0.5'
9
+ required : true
10
+ type : string
5
11
6
12
name : Continuous integration
7
13
73
79
run : |
74
80
PATH=$PWD/llvm/build/bin:$PATH ./tests/run.sh
75
81
82
+ - name : " index-import: archive"
83
+ run : |
84
+ cd build
85
+ COPYFILE_DISABLE=1 tar czvf index-import.tar.gz absolute-unit index-import
86
+
87
+ - name : " index-import: upload"
88
+ uses : actions/upload-artifact@v4
89
+ with :
90
+ path : build/index-import.tar.gz
91
+
92
+ create-release :
93
+ name : Create release
94
+ needs : build
95
+ runs-on : ubuntu-22.04
96
+ if : ${{ github.event_name == 'workflow_dispatch' }}
97
+ steps :
98
+ - name : Check out source code
99
+ uses : actions/checkout@v4
100
+
101
+ - name : Download index-import artifact
102
+ uses : actions/download-artifact@v4
103
+
104
+ - name : Create release
105
+ run : |
106
+ set -euo pipefail
107
+
108
+ macos_archive="index-import.tar.gz"
109
+ ./.github/generate-notes.sh "$SWIFT_VERSION" "$macos_archive" | tee notes.md
110
+ cat notes.md
111
+ echo "would have called" gh release create "$TAG" --title "$TAG" --target "$GITHUB_REF_NAME" --notes-file notes.md "$macos_archive"
112
+ env :
113
+ TAG : ${{ inputs.tag }}
114
+ SWIFT_VERSION : ${{ env.SWIFT_VERSION }}
115
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
116
+
76
117
# For local development, use the playground at
77
118
# https://rhysd.github.io/actionlint/
78
119
actionlint :
You can’t perform that action at this time.
0 commit comments