-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (67 loc) · 2.21 KB
/
library-deployment.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
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
name: Library deployment
on:
push:
tags:
- v*.*.*
defaults:
run:
shell: bash
jobs:
library-deployment:
name: 🚀 Build and upload provider
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt update && sudo apt install -y bash
- name: Check out repository code
uses: actions/checkout@main
- name: Treat repo as safe
run: git config --global --add safe.directory /__w/pulumi-spacelift/pulumi-spacelift
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1
with:
repo: pulumi/pulumictl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install pulumi
uses: pulumi/actions@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
- name: Install yarn
run: npm install --global yarn
- name: Setup DotNet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6
- name: Setup DotNet ICU
run: sudo apt-get update && sudo apt-get install -y icu-devtools
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Print version
run: pulumictl get version
- name: Build SDKs
run: make build_sdks
- name: Set NPM auth token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- name: Publish npm package.
run: cd sdk/nodejs/bin && npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create NuGet config
run: cp nuget.config.template sdk/dotnet/nuget.config
- name: Publish dotnet package
run: cd sdk/dotnet && dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
- name: Create release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
skipIfReleaseExists: true