From 7fac37e763b1b8b70d28b10ff6532bb42f96b54d Mon Sep 17 00:00:00 2001 From: Matthew R Kasun Date: Thu, 23 Feb 2023 07:50:38 -0500 Subject: [PATCH] upgrade release --- .github/workflows/upgraderelease.yml | 82 +++++----------------------- 1 file changed, 14 insertions(+), 68 deletions(-) diff --git a/.github/workflows/upgraderelease.yml b/.github/workflows/upgraderelease.yml index cf06e77c..f8305c6d 100644 --- a/.github/workflows/upgraderelease.yml +++ b/.github/workflows/upgraderelease.yml @@ -9,76 +9,22 @@ on: jobs: - netmaker-nmctl: + build-packages: + uses: ./github/workflows/packages.yml + with: + version: ${{ github.event.inputs.version }} + + pr-to-main: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: release_${{ github.event.inputs.version}} - fetch-depth: 0 - - name: Get Tags + - name: create pr run: | - git fetch --force --tags - - name: Setup go - uses: actions/setup-go@v3 - with: - go-version: 1.19 - - name: GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - args: release --clean --release-notes release.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + curl \ + -X POST \ + -H 'Accept: application/vnd.github+json' \ + -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}'\ + -H 'X-GitHub-Api-Version: 2022-11-28' \ + https://api.github.com/repos/${{ github.repository }}/pulls \ + -d '{"title":"{{ github.event.inputs.version }}","head":"release_${{ github.event.inputs.version }}","base":"master"}' - docker: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: release_${{ github.event.inputs.version}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64, linux/arm64, linux/arm/v7 - push: true - tags: ${{ github.repository }}:${{ github.event.inputs.version }}, ${{ github.repository }}:latest - build-args: | - tags=ce - docker-ee: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: release_${{ github.event.inputs.version}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - platforms: linux/amd64, linux/arm64 - push: true - tags: ${{ github.repository }}:${{ github.event.inputs.version }}-ee - build-args: | - tags=ee