Skip to content

Commit

Permalink
Setting up publish sdk job
Browse files Browse the repository at this point in the history
Building dotnet in release config
Adding all release steps to GHA
  • Loading branch information
pierskarsenbarg committed Aug 6, 2024
1 parent 687906b commit 4b2fdb2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 39 deletions.
84 changes: 48 additions & 36 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,39 +153,51 @@ jobs:
version: latest
strategy:
fail-fast: true
# publish_sdks:
# runs-on: ubuntu-latest
# needs: publish_provider
# strategy:
# fail-fast: true
# matrix:
# language:
# - nodejs
# - python
# - dotnet
# steps:
# - if: matrix.language == 'nodejs'
# name: Setup Node
# uses: actions/setup-node@v4
# with:
# node-version: ${{env.NODEJS_VERSION}}
# - if: matrix.language == 'dotnet'
# name: Setup DotNet
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: ${{env.DOTNET_VERSION}}
# - if: matrix.language == 'python'
# name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{env.PYTHON_VERSION}}
# - name: Download provider binaries
# uses: actions/download-artifact@v4
# with:
# name: ${{ env.PROVIDER }}-provider.tar.gz
# path: ${{ github.workspace }}/bin
# - if: matrix.language == 'python'
# name: Publish PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages_dir: ${{github.workspace}}/sdk/python/bin/dist
publish_sdks:
runs-on: ubuntu-latest
needs: publish_provider
strategy:
fail-fast: true
matrix:
language:
- nodejs
- python
- dotnet
steps:
- if: matrix.language == 'nodejs'
name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{env.NODEJS_VERSION}}
- if: matrix.language == 'dotnet'
name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{env.DOTNET_VERSION}}
- if: matrix.language == 'python'
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Download provider binaries
uses: actions/download-artifact@v4
with:
name: ${{ env.PROVIDER }}-provider.tar.gz
path: ${{ github.workspace }}/bin
- if: matrix.language == 'python'
name: Publish PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ${{github.workspace}}/sdk/python/bin/dist
- if: matrix.language == 'nodejs'
name: Publish NPM package
uses: JS-DevTools/npm-publish@v3
with:
access: "public"
token: ${{ secrets.NPM_TOKEN }}
package: ${{github.workspace}}/sdk/nodejs/bin/package.json
- if: matrix.language == 'dotnet'
name: Publish Nuget package
env:
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
run: find "${{github.workspace}}/sdk/dotnet/bin/Release/" -name 'PiersKarsenbarg.*.nupkg' -exec dotnet nuget push -k "${NUGET_PUBLISH_KEY}" -s https://api.nuget.org/v3/index.json {} ';'
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ schema*.json
.code
**/vendor/
.pulumi
**/bin/
**/obj/
**/node_modules/
.DS_Store
Expand All @@ -28,4 +27,8 @@ sdk/dotnet/version.txt
Pulumi.*.yaml
examples

sdk/python/venv
sdk/python/venv
sdk/python/bin
sdk/dotnet/bin
sdk/nodejs/bin
bin
2 changes: 1 addition & 1 deletion taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tasks:
- |
cd {{.SDK_DIR}}/dotnet/ && \
echo "{{.DOTNET_VERSION}}" >version.txt && \
dotnet build /p:Version={{.DOTNET_VERSION}}
dotnet build /p:Version={{.DOTNET_VERSION}} --configuration Release
vars:
DOTNET_VERSION:
sh: pulumictl get version --language dotnet
Expand Down

0 comments on commit 4b2fdb2

Please sign in to comment.