2020-10-08 21:43:38 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*.*.*
|
|
|
|
paths-ignore:
|
|
|
|
- 'CHANGELOG.md'
|
|
|
|
- 'README.md'
|
|
|
|
env:
|
|
|
|
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_PROD_ACCESS_TOKEN }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
PULUMI_TEST_OWNER: "moolumi"
|
|
|
|
GO111MODULE: "on"
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
|
|
|
|
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
|
|
TRAVIS_PUBLISH_PACKAGES: true
|
|
|
|
|
|
|
|
jobs:
|
2020-10-23 00:42:49 +02:00
|
|
|
chocolatey:
|
|
|
|
name: Chocolatey update
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish-sdks
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set tag version
|
|
|
|
run: |
|
2020-10-23 13:36:09 +02:00
|
|
|
echo "PULUMI_LATEST_TAG=$(pulumictl get version --language generic -o)" >> $GITHUB_ENV
|
2020-10-23 00:42:49 +02:00
|
|
|
- name: Repository Dispatch
|
|
|
|
run: |
|
|
|
|
pulumictl create choco-deploy ${{ env.PULUMI_LATEST_TAG }}
|
2020-10-23 12:54:13 +02:00
|
|
|
env:
|
2020-10-23 00:42:49 +02:00
|
|
|
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN}}
|
|
|
|
# sends a repository dispatch to this repo, to build the docker images
|
|
|
|
# note, the tagging format is unfortunately different for the two sets of images
|
|
|
|
# FIXME: consolidate the tagging to always include a v
|
2020-10-08 21:43:38 +02:00
|
|
|
docker:
|
2020-10-23 00:42:49 +02:00
|
|
|
name: Build Slim Docker Images
|
2020-10-08 21:43:38 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish-sdks
|
|
|
|
steps:
|
2020-10-23 00:42:49 +02:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set tag version
|
|
|
|
run: |
|
2020-10-23 13:36:09 +02:00
|
|
|
echo "PULUMI_LATEST_TAG=$(pulumictl get version --language generic -o)" >> $GITHUB_ENV
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Repository Dispatch
|
|
|
|
uses: peter-evans/repository-dispatch@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PULUMI_BOT_TOKEN }}
|
|
|
|
event-type: docker-build
|
2020-10-23 00:42:49 +02:00
|
|
|
client-payload: '{"ref": "${{ env.PULUMI_LATEST_TAG }}", "sha": "${{ github.sha }}"}'
|
|
|
|
# This sends a repository dispatch job to the docs repo
|
|
|
|
# chocolatey build needs to be triggered from here
|
2020-10-08 21:43:38 +02:00
|
|
|
docs:
|
|
|
|
name: Build Package Docs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish-sdks
|
|
|
|
steps:
|
2020-10-23 00:42:49 +02:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set tag version
|
|
|
|
run: |
|
2020-10-23 13:36:09 +02:00
|
|
|
echo "PULUMI_LATEST_TAG=$(pulumictl get version --language generic -o)" >> $GITHUB_ENV
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Repository Dispatch
|
|
|
|
uses: peter-evans/repository-dispatch@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PULUMI_BOT_TOKEN }}
|
2020-10-23 00:42:49 +02:00
|
|
|
repository: pulumi/docs
|
|
|
|
event-type: pulumi-cli
|
|
|
|
client-payload: '{"ref": "v${{ env.PULUMI_LATEST_TAG }}", "sha": "${{ github.sha }}"}'
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN}}
|
|
|
|
# Sends a repository dispatch job to the homebrew build
|
2020-10-08 21:43:38 +02:00
|
|
|
homebrew:
|
|
|
|
name: Update Homebrew
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: publish-sdks
|
|
|
|
steps:
|
2020-10-23 00:42:49 +02:00
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set tag version
|
|
|
|
run: |
|
2020-10-23 13:36:09 +02:00
|
|
|
echo "PULUMI_LATEST_TAG=$(pulumictl get version --language generic -o)" >> $GITHUB_ENV
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Repository Dispatch
|
|
|
|
uses: peter-evans/repository-dispatch@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PULUMI_BOT_TOKEN }}
|
|
|
|
event-type: homebrew-bump
|
2020-10-23 00:42:49 +02:00
|
|
|
client-payload: '{"ref": "v${{ env.PULUMI_LATEST_TAG }}", "sha": "${{ github.sha }}"}'
|
2020-10-08 21:43:38 +02:00
|
|
|
|
|
|
|
publish-sdks:
|
|
|
|
name: Publish SDKs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish-binaries
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-10-09 18:35:12 +02:00
|
|
|
go-version: [ 1.15.x ]
|
2020-11-04 01:28:45 +01:00
|
|
|
python-version: [ 3.9.x ]
|
2020-10-08 21:43:38 +02:00
|
|
|
dotnet-version: [ 3.1.x ]
|
2020-11-04 02:25:44 +01:00
|
|
|
node-version: [ 14.x ]
|
2020-10-08 21:43:38 +02:00
|
|
|
language: [ "nodejs", "python", "dotnet" ]
|
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Set up DotNet ${{ matrix.dotnet-version }}
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: ${{ matrix.dotnet-version }}
|
|
|
|
- name: Set up Node ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
registry-url: https://registry.npmjs.org
|
|
|
|
always-auth: true
|
|
|
|
- name: Install pipenv
|
|
|
|
uses: dschep/install-pipenv-action@v1
|
|
|
|
- name: Install Twine
|
|
|
|
run: python -m pip install pip twine
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Tags
|
|
|
|
run: |
|
|
|
|
git fetch --quiet --prune --unshallow --tags
|
|
|
|
- name: Update path
|
|
|
|
run: |
|
2020-10-23 00:42:49 +02:00
|
|
|
echo "${{ runner.temp }}/opt/pulumi/bin" >> $GITHUB_PATH
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Set Go Dep path
|
|
|
|
run: |
|
2020-10-23 14:30:31 +02:00
|
|
|
echo "PULUMI_GO_DEP_ROOT=$(dirname $(pwd))" >> $GITHUB_ENV
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Ensure
|
|
|
|
run: |
|
|
|
|
make ensure
|
|
|
|
- name: Publish Packages
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
run: |
|
|
|
|
make -C sdk/${{ matrix.language}} publish
|
|
|
|
publish-binaries:
|
|
|
|
name: Publish Binaries
|
|
|
|
runs-on: macos-latest
|
|
|
|
needs: build-and-test
|
2020-11-04 02:25:44 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
go-version: [ 1.15.x ]
|
2020-10-08 21:43:38 +02:00
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Tags
|
|
|
|
run: |
|
|
|
|
git fetch --quiet --prune --unshallow --tags
|
|
|
|
- name: Install pulumictl
|
|
|
|
uses: jaxxstorm/action-install-gh-release@6277ebec57d2f9283d245d365f0b05bcc23d85e0
|
|
|
|
with:
|
|
|
|
repo: pulumi/pulumictl
|
|
|
|
- name: Configure AWS Credentials
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: us-east-2
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
role-duration-seconds: 3600
|
|
|
|
role-external-id: upload-pulumi-release
|
|
|
|
role-session-name: pulumi@githubActions
|
|
|
|
role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }}
|
|
|
|
- name: Set Release Version
|
2020-10-23 00:42:49 +02:00
|
|
|
run: |
|
2020-10-23 13:36:09 +02:00
|
|
|
echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic -o)" >> $GITHUB_ENV
|
2020-10-08 21:43:38 +02:00
|
|
|
- name: Run GoReleaser
|
|
|
|
uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: -f .goreleaser.yml --rm-dist
|
|
|
|
lint:
|
|
|
|
container: golangci/golangci-lint:latest
|
|
|
|
name: Lint ${{ matrix.directory }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
directory: [ sdk, pkg, tests ]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Lint ${{ matrix.directory }}
|
|
|
|
run: |
|
|
|
|
cd ${{ matrix.directory }} && golangci-lint run -c ../.golangci.yml
|
|
|
|
build-and-test:
|
|
|
|
name: Build & Test
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
platform: [ ubuntu-latest, macos-latest ]
|
2020-10-09 18:35:12 +02:00
|
|
|
go-version: [1.15.x]
|
2020-11-04 01:28:45 +01:00
|
|
|
python-version: [ 3.9.x ]
|
2020-10-08 21:43:38 +02:00
|
|
|
dotnet-version: [ 3.1.x ]
|
2020-11-04 02:25:44 +01:00
|
|
|
node-version: [ 14.x ]
|
2020-10-08 21:43:38 +02:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
|
|
- name: Set up Go ${{ matrix.go-version }}
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Set up DotNet ${{ matrix.dotnet-version }}
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: ${{ matrix.dotnet-version }}
|
|
|
|
- name: Set up Node ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Install pipenv
|
|
|
|
uses: dschep/install-pipenv-action@v1
|
|
|
|
- name: Setup git
|
|
|
|
run: |
|
|
|
|
git config --global user.email "you@example.com"
|
|
|
|
git config --global user.name "Your Name"
|
|
|
|
- name: Update path
|
|
|
|
run: |
|
|
|
|
echo "::add-path::${{ runner.temp }}/opt/pulumi/bin"
|
|
|
|
- name: Checkout Repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Fetch Tags
|
|
|
|
run: |
|
|
|
|
git fetch --quiet --prune --unshallow --tags
|
|
|
|
- name: Set Go Dep path
|
|
|
|
run: |
|
|
|
|
echo "::set-env name=PULUMI_GO_DEP_ROOT::$(dirname $(pwd))"
|
|
|
|
- name: Ensure
|
|
|
|
run: |
|
|
|
|
make ensure
|
|
|
|
- name: Dist
|
|
|
|
run: |
|
|
|
|
make dist
|
|
|
|
env:
|
|
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
make install_all
|
|
|
|
env:
|
|
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
make test_all
|
|
|
|
env:
|
|
|
|
PULUMI_NODE_MODULES: ${{ runner.temp }}/opt/pulumi/node_modules
|
|
|
|
PULUMI_LOCAL_NUGET: ${{ runner.temp }}/opt/pulumi/nuget
|
|
|
|
PULUMI_ROOT: ${{ runner.temp }}/opt/pulumi
|
|
|
|
|
|
|
|
|