From ae547708a9161f6bbaf1eb537ef2600c26e71e10 Mon Sep 17 00:00:00 2001 From: peterdeme Date: Fri, 27 Oct 2023 18:53:20 +0200 Subject: [PATCH] Add create release logic Signed-off-by: peterdeme --- .github/workflows/build-library.yml | 11 +++-------- .github/workflows/build-provider.yml | 15 +++++++-------- .github/workflows/library-deployment.yml | 8 +++++++- .github/workflows/preprod-deployment.yml | 2 +- .github/workflows/prod-deployment.yml | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-library.yml b/.github/workflows/build-library.yml index 2909b96..ab751a9 100644 --- a/.github/workflows/build-library.yml +++ b/.github/workflows/build-library.yml @@ -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 @@ -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: diff --git a/.github/workflows/build-provider.yml b/.github/workflows/build-provider.yml index 837ec65..15bb0ac 100644 --- a/.github/workflows/build-provider.yml +++ b/.github/workflows/build-provider.yml @@ -8,23 +8,20 @@ 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 + 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: @@ -36,7 +33,9 @@ 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 @@ -44,4 +43,4 @@ jobs: - name: Build provider run: make provider env: - PROVIDER_OS: ${{ matrix.provider_os }} \ No newline at end of file + PROVIDER_OS: ${{ matrix.provider_os }} diff --git a/.github/workflows/library-deployment.yml b/.github/workflows/library-deployment.yml index 92c8a2a..ec09510 100644 --- a/.github/workflows/library-deployment.yml +++ b/.github/workflows/library-deployment.yml @@ -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 @@ -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 diff --git a/.github/workflows/preprod-deployment.yml b/.github/workflows/preprod-deployment.yml index 9e2de5a..f9ea378 100644 --- a/.github/workflows/preprod-deployment.yml +++ b/.github/workflows/preprod-deployment.yml @@ -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: diff --git a/.github/workflows/prod-deployment.yml b/.github/workflows/prod-deployment.yml index 1262ac9..7564972 100644 --- a/.github/workflows/prod-deployment.yml +++ b/.github/workflows/prod-deployment.yml @@ -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: