Skip to content

Commit

Permalink
Tagged builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverguy25 committed Jun 3, 2024
1 parent 965f978 commit 19c34d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 64 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/publish-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,3 @@ jobs:
with:
enable-coverage: true
secrets: inherit
publish-sdks:
# needs: [test, lint]
uses: ./.github/workflows/stage-publish-sdk.yml
with:
version: ${{ github.ref_name }}
prerelease: true
secrets: inherit
58 changes: 3 additions & 55 deletions .github/workflows/stage-publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,59 +69,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org

- name: Generate SDKs
uses: ./.github/actions/generate_sdk
env:
VERSION: ${{ inputs.version }}

- name: Checkout Go SDK repo
uses: actions/checkout@v4
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/esc-sdk
path: sdk/esc-sdk
fetch-depth: 0

- name: Checkout prerelease branch
if: inputs.prerelease == true
working-directory: sdk/esc-sdk
run: git checkout -b ${{ inputs.version }}

- name: Checkout main branch
if: inputs.prerelease == false
working-directory: sdk/esc-sdk
run: git checkout main

- name: Copy files
uses: pulumi/glob-action@v1
with:
operation: copy
source: sdk/go
destination: sdk/esc-sdk
files: |
**
- name: Commit and tag
working-directory: sdk/esc-sdk
- name: Tag release
run: |
git config user.name "Pulumi Bot"
git config user.email "[email protected]"
git add .
git commit -m "v${{ inputs.version }}"
git tag "${{ inputs.version }}"
- name: Publish to prerelease branch
if: inputs.prerelease == true
working-directory: sdk/esc-sdk
run: git push -u origin ${{ inputs.version }} --tags

- name: Publish to master branch
if: inputs.prerelease == false
working-directory: sdk/esc-sdk
run: git push -u origin main --tags
git tag sdk/"${{ inputs.version }}"
git push -u origin $(git rev-parse --abbrev-ref HEAD) --tags
2 changes: 0 additions & 2 deletions .github/workflows/stage-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
stable: ${{ matrix.go-stable }}
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
- name: Test w/coverage
if: ${{ inputs.enable-coverage }}
run: make test_cover
Expand Down

0 comments on commit 19c34d1

Please sign in to comment.