Skip to content

Update publish-release.yaml #32

Update publish-release.yaml

Update publish-release.yaml #32

name: Publish Release
on:
push:
tags:
- v*.*.*
- '!v*.*.*-**'
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
jobs:
lint:
uses: ./.github/workflows/stage-lint.yml
test:
uses: ./.github/workflows/stage-test.yml
with:
enable-coverage: true
secrets: inherit
publish:
needs: [test, lint]
uses: ./.github/workflows/stage-publish.yml
with:
goreleaser-args: -p 10 -f .goreleaser.yml --rm-dist --skip-validate --timeout 60m0s --release-notes=CHANGELOG_PENDING.md
secrets: inherit
s3-blobs:
needs: [publish]
name: s3 blobs
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- 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: Download release artifacts
run: |
mkdir -p artifacts
gh release download "${{ github.ref_name }}" --dir ./artifacts --pattern 'esc-*'
find artifacts
- name: Publish Blobs
run: |
aws s3 sync artifacts s3://get.pulumi.com/esc/releases --acl public-read
dispatch:
name: ${{ matrix.job.name }}
if: "!contains(${{ github.ref_name }}, '-')"
runs-on: ubuntu-latest
needs: [publish]
strategy:
fail-fast: false
matrix:
job:
- name: Dispatch docs workflow
run-command: pulumictl create cli-docs-build "${{ github.ref_name }}" --event-type "esc-cli"
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.ref_name }}
- name: Install Pulumictl
uses: jaxxstorm/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
with:
repo: pulumi/pulumictl
tag: v0.0.45
cache: enable
- name: Repository Dispatch
run: ${{ matrix.job.run-command }}