test #6
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*.*.* | |
env: | |
# THIS GITHUB_TOKEN IS A REQUIREMENT TO BE ABLE TO WRITE TO GH RELEASES | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# IF YOU NEED TO PUBLISH A NPM PACKAGE THEN ENSURE A NPM_TOKEN SECRET IS SET | |
# AND PUBLISH_NPM: TRUE. IF YOU WANT TO PUBLISH TO A PRIVATE NPM REGISTRY | |
# THEN ENSURE THE NPM_REGISTRY_URL IS CHANGED | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | |
PUBLISH_NPM: true | |
NPM_REGISTRY_URL: https://registry.npmjs.org | |
# IF YOU NEED TO PUBLISH A NUGET PACKAGE THEN ENSURE AN NUGET_PUBLISH_KEY | |
# SECRET IS SET AND PUBLISH_NUGET: TRUE. IF YOU WANT TO PUBLISH TO AN ALTERNATIVE | |
# NPM REGISTRY THEN ENSURE THE NPM_REGISTRY_URL IS CHANGED | |
# NUGET_PUBLISH_KEY: ${{ YOUR NUGET PUBLISH KEY HERE }} | |
# NUGET_FEED_URL: https://api.nuget.org/v3/index.json | |
# PUBLISH_NUGET: true | |
# IF YOU NEED TO PUBLISH A PYPI PACKAGE SET PUBLISH_PYPI: TRUE AND CHANGE PYPI_PASSWORD, PYPI_USERNAME TO YOUR CREDENTIALS. | |
# IF YOU WANT TO PUBLISH TO AN ALTERNATIVE PYPI REGISTRY THEN ENSURE THE PYPI_REPOSITORY_URL IS SET. | |
# PYPI_PASSWORD: ${{ YOUR PYPI PASSWORD HERE }} | |
# PYPI_USERNAME: "YOUR PYPI USERNAME HERE" | |
# PYPI_REPOSITORY_URL: "" | |
# PUBLISH_PYPI: true | |
jobs: | |
publish_binary: | |
name: publish | |
runs-on: ubuntu-latest | |
steps: | |
- 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@v2 | |
with: | |
go-version: ${{matrix.goversion}} | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- name: Set PreRelease Version | |
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> $GITHUB_ENV | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
args: -p 3 release --clean | |
version: latest | |
strategy: | |
fail-fast: true | |
matrix: | |
goversion: | |
- 1.21.x | |
build_sdk: | |
name: Build SDKs | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.provider-version.outputs.version }} | |
strategy: | |
fail-fast: true | |
matrix: | |
language: | |
- nodejs | |
# - go | |
# - dotnet | |
# - python | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: pulumi/provider-version-action@v1 | |
id: provider-version | |
- name: Install devbox | |
uses: jetify-com/[email protected] | |
with: | |
enable-cache: true | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Build SDK | |
run: devbox run -- make build_${{ matrix.language }} | |
- name: Upload SDK | |
uses: ./.github/actions/upload-sdk | |
with: | |
language: ${{ matrix.language }} | |
publish_sdk: | |
name: Publish SDKs | |
runs-on: ubuntu-latest | |
needs: build_sdk | |
env: | |
VERSION: ${{ needs.build_sdk.outputs.version }} | |
steps: | |
- name: Publish SDKs | |
uses: pulumi/[email protected] | |
with: | |
version: ${{ needs.build_sdk.outputs.version }} | |
strategy: | |
fail-fast: true | |
matrix: | |
sdk: | |
- nodejs | |
# - python | |
# - dotnet | |
# - go |