Skip to content

Add write access to NPM job, rename action to release #1

Add write access to NPM job, rename action to release

Add write access to NPM job, rename action to release #1

Workflow file for this run

on:
push:
tags:
- 'v*'
jobs:
publish_binary:
name: publish
runs-on: ubuntu-latest
# Add write permissions for the GITHUB_TOKEN
permissions: write-all
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.goversion}}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.10.0
with:
repo: pulumi/pulumictl
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --clean
version: latest
strategy:
fail-fast: true
matrix:
goversion:
- 1.21.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_sdk:
name: Publish SDKs
runs-on: ubuntu-latest
permissions: write-all
needs: publish_binary
steps:
- name: Publish SDKs
uses: pulumi/pulumi-package-publisher@v0.0.13
strategy:
fail-fast: true
matrix:
language:
- nodejs
nodeversion:
- latest # For future-proofing
- 21.x # Latest at workflow creation
- 20.x # LTS release
- 18.x # Previous LTS release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_API_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_API_TOKEN }}
PUBLISH_NPM: true