Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Build SDKs issue in cicd #14

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 69 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,75 @@ jobs:
runs-on: ubuntu-latest
needs: publish_binary
steps:
- name: Publish SDKs
uses: pulumi/[email protected]
- name: Checkout Repo
uses: actions/checkout@v2

- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.goversion }}

- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl

- name: Install pulumi
uses: pulumi/actions@v4

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{matrix.nodeversion}}
registry-url: ${{env.NPM_REGISTRY_URL}}
ingridcrant marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup DotNet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnetverson}}
ingridcrant marked this conversation as resolved.
Show resolved Hide resolved

- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{matrix.pythonversion}}
ingridcrant marked this conversation as resolved.
Show resolved Hide resolved

- name: Build SDK
run: make build_${{ matrix.language }}
volodymyrZotov marked this conversation as resolved.
Show resolved Hide resolved

- name: Check worktree clean
run: |
git update-index -q --refresh
if ! git diff-files --quiet; then
>&2 echo "error: working tree is not clean, aborting!"
git status
git diff
exit 1
fi

- if: ${{ matrix.language == 'python' && env.PUBLISH_PYPI == 'true' }}
name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ env.PYPI_USERNAME }}
password: ${{ env.PYPI_PASSWORD }}
ingridcrant marked this conversation as resolved.
Show resolved Hide resolved
packages_dir: ${{github.workspace}}/sdk/python/bin/dist

- if: ${{ matrix.language == 'nodejs' && env.PUBLISH_NPM == 'true' }}
volodymyrZotov marked this conversation as resolved.
Show resolved Hide resolved
uses: JS-DevTools/npm-publish@v1
with:
access: "public"
token: ${{ env.NPM_TOKEN }}
package: ${{github.workspace}}/sdk/nodejs/bin/package.json

- if: ${{ matrix.language == 'dotnet' && env.PUBLISH_NUGET == 'true' }}
name: publish nuget package
run: |
dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ env.NUGET_PUBLISH_KEY }}
echo "done publishing packages"

strategy:
fail-fast: true
matrix:
Expand Down
Loading