-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (81 loc) · 2.83 KB
/
release.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
env:
DEVELOPER_DIR: /Applications/Xcode_15.1.app
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
release:
permissions:
contents: write
runs-on: macOS-13
steps:
- uses: actions/checkout@v4
- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Verify Version
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
PLUGIN_VERSION=$(./gradlew -q getVersion)
if [[ $PLUGIN_VERSION = $VERSION ]]; then exit 0 ; else exit 1; fi
- name: Get the release notes
id: get_release_notes
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
run: |
delimiter="$(openssl rand -hex 8)"
{
echo "NOTES<<${delimiter}"
awk "/## Version $VERSION/{flag=1;next}/## Version/{flag=0}flag" CHANGELOG.md
echo ${delimiter}
} >> $GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version: '3.9'
# - name: Setup GCP Auth
# uses: google-github-actions/auth@v1
# with:
# credentials_json: ${{ secrets.GCP_SA_KEY }}
# # Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`.
# - name: Set up Google Cloud SDK
# uses: google-github-actions/setup-gcloud@v1
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore workloads
run: |
dotnet workload install android ios maui-android maui-ios maui-maccatalyst
# - name: Install doc dependencies
# run: |
# brew install doxygen
# brew install graphviz
- name: Build and Publish Nugets
env:
NUGET_PRODUCTION_API_KEY: ${{ secrets.NUGET_PRODUCTION_API_KEY }}
run: ./gradlew build pack publishToProduction
#run: ./gradlew build pack packageDocs
- name: Create Github Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
body: ${{ steps.get_release_notes.outputs.NOTES }}
draft: false
prerelease: false
# - name: Upload Docs
# run: |
# VERSION=${{ steps.get_version.outputs.VERSION }}
# gsutil cp docs/build/$VERSION.tar.gz gs://ua-web-ci-prod-docs-transfer/libraries/maui/$VERSION.tar.gz