Skip to content

Commit 31fc220

Browse files
committed
Release pipeline test
Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
1 parent e9870d7 commit 31fc220

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

.github/workflows/release.yaml

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,39 @@ on:
88
permissions:
99
contents: write
1010
id-token: write
11+
packages: write
1112

1213
env:
13-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_TOKEN: ${{ secrets.PR_TOKEN }}
1415
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1516
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
16-
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
17-
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
1817
PROVIDER: stackit
1918
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
20-
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
21-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
22-
PYPI_USERNAME: "__token__"
23-
PUBLISH_PYPI: true
2419
PUBLISH_NPM: true
25-
PUBLISH_NUGET: true
20+
#NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
21+
#NUGET_FEED_URL: https://api.nuget.org/v3/index.json
22+
#PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
23+
#PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
#PYPI_USERNAME: "__token__"
25+
#PUBLISH_PYPI: true
26+
#PUBLISH_NUGET: true
2627
jobs:
2728
publish_binary:
2829
name: publish
2930
runs-on: ubuntu-latest
3031
steps:
32+
# TODO: remove when this repo is made public
33+
- name: Configure Git for Private Modules
34+
run: |
35+
git config --global url."https://oauth2:${{ secrets.PR_TOKEN }}@github.com".insteadOf "https://github.com"
36+
# Sets GOPRIVATE and GONOSUMDB in order to use the git authetnication for go mod.
37+
echo "GOPRIVATE=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
38+
echo "GONOSUMDB=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
39+
# TODO: remove end
3140
- name: Checkout Repo
3241
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # tag=v4.2.2
42+
with:
43+
fetch-depth: 0
3344
- name: Unshallow clone for tags
3445
run: git fetch --prune --unshallow --tags
3546
- name: Install pulumictl
@@ -44,6 +55,11 @@ jobs:
4455
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV
4556
- uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
4657
- uses: anchore/sbom-action/download-syft@fbfd9c6c189226748411491745178e0c2017392d # v0.20.10
58+
- name: Debugging what was changed
59+
run: |
60+
git status
61+
git diff
62+
git tag -n
4763
- name: Run GoReleaser
4864
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # tag=v6.3.0
4965
with:
@@ -69,6 +85,14 @@ jobs:
6985
runs-on: ubuntu-latest
7086
needs: publish_binary
7187
steps:
88+
# TODO: remove when this repo is made public
89+
- name: Configure Git for Private Modules
90+
run: |
91+
git config --global url."https://oauth2:${{ secrets.PR_TOKEN }}@github.com".insteadOf "https://github.com"
92+
# Sets GOPRIVATE and GONOSUMDB in order to use the git authetnication for go mod.
93+
echo "GOPRIVATE=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
94+
echo "GONOSUMDB=github.com/${{ github.repository }}/*,github.com/stackitcloud/*" >> $GITHUB_ENV
95+
# TODO: remove end
7296
- name: Checkout Repo
7397
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # tag=v4.2.2
7498
- name: Unshallow clone for tags
@@ -87,7 +111,7 @@ jobs:
87111
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # tag=v6.0.0
88112
with:
89113
node-version: ${{matrix.nodeversion}}
90-
registry-url: ${{env.NPM_REGISTRY_URL}}
114+
#registry-url: ${{env.NPM_REGISTRY_URL}}
91115
- name: Setup DotNet
92116
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # tag=v5.0.0
93117
with:
@@ -107,6 +131,8 @@ jobs:
107131
git diff
108132
exit 1
109133
fi
134+
- name: Run all unit tests
135+
run: make test
110136
- if: ${{ matrix.language == 'python' && env.PUBLISH_PYPI == 'true' }}
111137
name: Publish package to PyPI
112138
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # tag=v1.13.0
@@ -117,8 +143,9 @@ jobs:
117143
- if: ${{ matrix.language == 'nodejs' && env.PUBLISH_NPM == 'true' }}
118144
uses: JS-DevTools/npm-publish@7f8fe47b3bea1be0c3aec2b717c5ec1f3e03410b # tag=v4.1.1
119145
with:
120-
access: "public"
121-
token: ${{ env.NPM_TOKEN }}
146+
access: "private"
147+
#token: ${{ env.NPM_TOKEN }}
148+
token: ${{ secrets.PR_TOKEN }}
122149
package: ${{github.workspace}}/sdk/nodejs/bin/package.json
123150
provenance: true
124151
- if: ${{ matrix.language == 'dotnet' && env.PUBLISH_NUGET == 'true' }}

go.work.sum

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
523523
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
524524
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
525525
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
526+
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 h1:dHQOQddU4YHS5gY33/6klKjq7Gp3WwMyOXGNp5nzRj8=
526527
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053/go.mod h1:+nZKN+XVh4LCiA9DV3ywrzN4gumyCnKjau3NGb9SGoE=
527528
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU=
528529
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE=

0 commit comments

Comments
 (0)