forked from xamarin/GoogleApisForiOSComponents
-
-
Notifications
You must be signed in to change notification settings - Fork 29
68 lines (57 loc) · 1.82 KB
/
Copy pathpublish-github-packages.yml
File metadata and controls
68 lines (57 loc) · 1.82 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Publish (GitHub Packages)
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
names:
description: "Cake --names (comma-separated)"
required: false
default: "Google.SignIn"
permissions:
contents: read
packages: write
jobs:
publish:
runs-on: macos-15
env:
CAKE_NAMES: ${{ inputs.names || 'Google.SignIn' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain versions
run: |
xcodebuild -version
swift --version
xcode-select -p
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Configure GitHub Packages NuGet source (this repo owner)
run: |
dotnet nuget remove source "github-owner" >/dev/null 2>&1 || true
dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--name "github-owner" \
--username "${{ github.actor }}" \
--password "${{ secrets.GITHUB_TOKEN }}" \
--store-password-in-clear-text
- name: Restore .NET workloads
run: dotnet workload restore Xamarin.Google.sln
- name: Install CocoaPods
run: |
if ! command -v pod >/dev/null 2>&1; then
sudo gem install cocoapods
fi
pod --version
- name: Restore tools
run: dotnet tool restore
- name: Build + pack
run: dotnet tool run dotnet-cake -- --target=nuget --names="${CAKE_NAMES}"
- name: Push packages
run: |
dotnet nuget push "output/*.nupkg" \
--source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--api-key "${{ secrets.GITHUB_TOKEN }}" \
--skip-duplicate