Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
larrywax committed Aug 22, 2024
1 parent 2bacaca commit c568d2f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
47 changes: 21 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
# 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
Expand Down Expand Up @@ -87,29 +86,25 @@ jobs:
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 }}
- name: Publish SDK
run: devbox run -- make publish_${{ 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
# 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
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ build_dotnet:: install_plugins tfgen # build the dotnet sdk
build_go:: install_plugins tfgen # build the go sdk
$(WORKING_DIR)/bin/$(TFGEN) go --overlays provider/overlays/go --out sdk/go/

publish_nodejs:: build_nodejs
cd $(WORKING_DIR)/sdk/nodejs && \
npm publish

publish_python::
echo "Not implemented" && exit 1

publish_dotnet::
echo "Not implemented" && exit 1

publish_go::
echo "Not implemented" && exit 1

lint_provider:: provider # lint the provider code
cd provider && golangci-lint run -c ../.golangci.yml

Expand Down

0 comments on commit c568d2f

Please sign in to comment.