Skip to content

Porting petoju terraform-provider-mysql (#1) #13

Porting petoju terraform-provider-mysql (#1)

Porting petoju terraform-provider-mysql (#1) #13

Workflow file for this run

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 }}
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 plugin binary
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
publish_sdk:
name: Publish SDKs
runs-on: ubuntu-latest
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
- 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: Publish SDK
run: devbox run -- make publish_${{ matrix.language }}