Set the version in the docker build (#152) #52
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: | |
PROVIDER: baremetal | |
GITHUB_TOKEN: ${{ github.token }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NPM_REGISTRY_URL: https://registry.npmjs.org | |
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_API_KEY }} | |
NUGET_FEED_URL: https://api.nuget.org/v3/index.json | |
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
PYPI_USERNAME: __token__ | |
jobs: | |
publish_binary: | |
name: publish | |
runs-on: ubuntu-latest | |
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-file: provider/go.mod | |
cache-dependency-path: provider/go.sum | |
- id: version | |
name: Set Provider Version | |
uses: pulumi/provider-version-action@v1 | |
with: | |
set-env: PROVIDER_VERSION | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
args: release | |
env: | |
GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/resource_linux_amd64_v1/pulumi-resource-baremetal | |
name: provider | |
publish_sdk: | |
name: Publish SDKs | |
needs: [publish_binary] | |
uses: ./.github/workflows/sdk.yml | |
with: | |
release: true | |
secrets: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} |