Skip to content

Commit

Permalink
Update GHA (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
dehume authored Oct 2, 2023
1 parent 1708a37 commit 0f9ac82
Showing 1 changed file with 9 additions and 52 deletions.
61 changes: 9 additions & 52 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,7 @@ 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_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_NPM: false
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: ${{ secrets.NUGET_KEY }}
NUGET_FEED_URL: https://api.nuget.org/v3/index.json
PUBLISH_NUGET: false
# IF YOU NEED TO PUBLISH A PYPI PACKAGE THEN ENSURE AN PYPI_API_TOKEN
# SECRET IS SET AND PUBLISH_PYPI: TRUE. IF YOU WANT TO PUBLISH TO AN ALTERNATIVE
# PYPI REGISTRY THEN ENSURE THE PYPI_REPOSITORY_URL IS SET. IF YOU ARE USING AN API_TOKEN THEN
# YOU DO NOT NEED TO CHANGE THE PYPI_USERNAME (__token__) , IF YOU ARE USING PASSWORD AUTHENTICATION THEN YOU WILL
# NEED TO CHANGE TO USE THE CORRECT PASSWORD
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
PUBLISH_PYPI: true

jobs:
publish_binary:
name: publish
Expand All @@ -39,7 +17,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{matrix.goversion}}
go-version: 1.21.x
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
Expand All @@ -51,31 +29,10 @@ jobs:
with:
version: latest
args: -p 3 release --rm-dist
strategy:
fail-fast: true
matrix:
goversion:
- 1.21.x
publish_sdk:
name: Publish SDKs
runs-on: ubuntu-latest
needs: publish_binary
steps:
- name: Publish SDKs
uses: pulumi/[email protected]
strategy:
fail-fast: true
matrix:
# dotnetversion:
# - 3.1.301
goversion:
- 1.21.x
language:
# - nodejs
- python
# - dotnet
# - go
# nodeversion:
# - 14.x
pythonversion:
- "3.9"
- name: Build Python SDK
run: make build_python
- name: Publish Python SDK
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: sdk/python/bin/dist/

0 comments on commit 0f9ac82

Please sign in to comment.