Skip to content

Commit

Permalink
Add create release logic (#44)
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <[email protected]>
  • Loading branch information
peterdeme authored Oct 27, 2023
1 parent 60ec389 commit 2155c7b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name: Build library

on: { push: { branches-ignore: [future, main] } }
on: { pull_request: {} }

concurrency:
group: build-library-${{ github.ref }}
cancel-in-progress: true

jobs:
build-library:
name: Build library
name: 👷‍♀️ Build library
runs-on: ubuntu-latest
container: golang:1.21-alpine
steps:
- name: Install build dependencies
run: |
apk add --no-cache alpine-sdk git bash npm python3 py3-pip
run: apk add --no-cache alpine-sdk git bash npm python3 py3-pip

- name: Install yarn
run: npm install --global yarn

- name: Setup Dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6
with: { dotnet-version: 6 }

- name: Check out repository code
uses: actions/checkout@main
Expand All @@ -31,9 +29,6 @@ jobs:
- name: Treat repo as safe
run: git config --global --add safe.directory /__w/pulumi-spacelift/pulumi-spacelift

- name: Remove Pulumi directory
run: rm -rf /github/home/.pulumi

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1
with:
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/build-provider.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
name: Build provider

on: { push: { branches-ignore: [future, main] } }
on: { pull_request: {} }

concurrency:
group: build-provider-${{ github.ref }}
cancel-in-progress: true

jobs:
build-provider:
name: Build provider
name: 👷‍♀️ Build provider
runs-on: ubuntu-latest
container: golang:1.21-alpine
steps:
- name: Install build dependencies
run: |
apk add --no-cache alpine-sdk git bash
run: apk add --no-cache alpine-sdk git bash

- name: Check out repository code
uses: actions/checkout@main
with: { fetch-depth: 0 }

- name: Treat repo as safe
run: git config --global --add safe.directory /__w/pulumi-spacelift/pulumi-spacelift

- name: Remove Pulumi directory
run: rm -rf /github/home/.pulumi

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1
with:
Expand All @@ -36,12 +33,14 @@ jobs:
uses: pulumi/actions@v4

- name: Tag version
run: git tag -d `git tag | grep -E '.'` && git tag v0.0.0
run: |
CURRENTTAG=$(git describe --tags --abbrev=0)
git tag $CURRENTTAG${{ github.run_number }}
- name: Print version
run: pulumictl get version

- name: Build provider
run: make provider
env:
PROVIDER_OS: ${{ matrix.provider_os }}
PROVIDER_OS: ${{ matrix.provider_os }}
8 changes: 7 additions & 1 deletion .github/workflows/library-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults:

jobs:
library-deployment:
name: Build and upload provider
name: 🚀 Build and upload provider
runs-on: ubuntu-latest
steps:
- name: Install dependencies
Expand Down Expand Up @@ -79,3 +79,9 @@ jobs:

- name: Publish dotnet package
run: cd sdk/dotnet && dotnet nuget push ${{github.workspace}}/sdk/dotnet/bin/Debug/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"

- name: Create release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
skipIfReleaseExists: true
2 changes: 1 addition & 1 deletion .github/workflows/preprod-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
preprod-provider-deployment:
name: Build and upload provider
name: 🚀 Build and upload provider
runs-on: ubuntu-latest
container: golang:1.21-alpine
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prod-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
prod-provider-deployment:
name: Build and upload provider
name: 🚀 Build and upload provider
runs-on: ubuntu-latest
container: golang:1.21-alpine
permissions:
Expand Down

0 comments on commit 2155c7b

Please sign in to comment.