-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.17 KB
/
Copy pathrelease.yml
File metadata and controls
45 lines (39 loc) · 1.17 KB
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
name: Build and Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-release:
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Show toolchain
run: |
sw_vers
xcodebuild -version
swift --version
- name: Build app, ZIP, and PKG
run: |
VERSION="0.1.${GITHUB_RUN_NUMBER}"
BUILD_COMMIT="${GITHUB_SHA:0:7}"
VERSION="$VERSION" BUILD_NUMBER="$GITHUB_RUN_NUMBER" BUILD_COMMIT="$BUILD_COMMIT" DEFAULT_REPOSITORY="$GITHUB_REPOSITORY" ./scripts/package.sh
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="0.1.${GITHUB_RUN_NUMBER}"
TAG="v${VERSION}"
gh release create "$TAG" \
"dist/TokenMeter.zip" \
"dist/TokenMeter.pkg" \
"dist/TokenMeter-${VERSION}.zip" \
"dist/TokenMeter-${VERSION}.pkg" \
--target "$GITHUB_SHA" \
--title "TokenMeter ${VERSION}" \
--notes "Automated build from main commit ${GITHUB_SHA}." \
--latest