added version group v0 #37
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- v*.*.* | |
- '!v*.*.*-**' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_REGISTRY_URL: https://registry.npmjs.org | |
NUGET_FEED_URL: https://api.nuget.org/v3/index.json | |
PYPI_USERNAME: "__token__" | |
jobs: | |
publish_binary: | |
name: publish | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.20.x | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Install Pulumi CLI | |
uses: pulumi/[email protected] | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21.x | |
registry-url: ${{env.NPM_REGISTRY_URL}} | |
- name: Setup DotNet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
args: -p 3 release --clean | |
version: latest | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Unshallow clone for tags | |
run: git fetch --prune --unshallow --tags | |
- name: Create new tag | |
id: create_tag | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: sdk/${{ github.ref_name }} | |
tag_prefix: "" | |
release_branches: main | |
- name: Generate SDK | |
run: make build | |
- name: Compress SDK folder | |
run: | | |
for language in nodejs python dotnet go; do | |
tar -zcf sdk/$language.tar.gz -C sdk/$language . | |
done | |
- name: Upload artifacts | |
run: | | |
cd ${{github.workspace}}/sdk | |
gh release upload ${{github.ref_name}} *.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} | |
shell: bash | |
- name: publish nuget package | |
run: | | |
dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg -s ${{ env.NUGET_FEED_URL }} -k ${{ secrets.NUGET_PUBLISH_KEY }} | |
echo "done publishing packages" | |
- 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 | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: ${{ env.PYPI_USERNAME }} | |
password: ${{ secrets.PYPI_PASSWORD }} | |
packages-dir: ${{github.workspace}}/sdk/python/bin/dist | |
strategy: | |
fail-fast: true |