Skip to content

Commit

Permalink
Add create release logic
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <[email protected]>
  • Loading branch information
peterdeme committed Oct 27, 2023
1 parent 60ec389 commit 900d936
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 29 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@ concurrency:

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,15 +29,15 @@ 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: Remove Pulumi directory
# run: rm -rf /github/home/.pulumi

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1
with:
repo: pulumi/pulumictl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Install pulumictl
# uses: jaxxstorm/action-install-gh-release@v1
# with:
# repo: pulumi/pulumictl
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install pulumi
uses: pulumi/actions@v4
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/build-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,41 @@ concurrency:

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

- 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: Remove Pulumi directory
# run: rm -rf /github/home/.pulumi

- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1
with:
repo: pulumi/pulumictl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Install pulumictl
# uses: jaxxstorm/action-install-gh-release@v1
# with:
# repo: pulumi/pulumictl
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install pulumi
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 900d936

Please sign in to comment.