diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml deleted file mode 100644 index b6a1e2c5..00000000 --- a/.github/workflows/prerelease.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: PreRelease - -on: - workflow_dispatch: - inputs: - version: - description: "new version number" - required: true - -jobs: - release-branch: - runs-on: ubuntu-latest - steps: - - name: checkout develop - uses: actions/checkout@v3 - with: - ref: develop - - name: setup go - uses: actions/setup-go@v3 - with: - go-version: 1.19 - - name: setup git - run: | - git config user.name "Github Actions" - git config user.emaail "info@netmaker.io" - - name: create release Branch - run: | - git switch -c release_${{ github.event.inputs.version }} - git tag -f ${{ github.event.inputs.version }} - git push origin --tags release_${{ github.event.inputs.version }} - - create-prelease: - runs-on: ubuntu-latest - needs: release-branch - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: release_${{ github.event.inputs.version}} - fetch-depth: 0 - - name: Get Tags - 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 -f .goreleaser.prerelease.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/upgraderelease.yml b/.github/workflows/upgraderelease.yml new file mode 100644 index 00000000..50106875 --- /dev/null +++ b/.github/workflows/upgraderelease.yml @@ -0,0 +1,41 @@ +name: UpgradeRelease + +on: + workflow_dispatch: + inputs: + version: + description: "release/version to update" + required: true + +jobs: + + update: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + with: + ref: release_${{ github.event.inputs.version }} + fetch-depth: 0 + - 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 -f .goreleaser.update.yaml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + packages: + uses: ./.github/workflows/packages.yml + with: + version: ${{ github.event.inputs.version }} + + pull-request: + uses: ./.github/workflows/pull-request.yml + with: + version: ${{ github.event.inputs.version }} \ No newline at end of file diff --git a/.goreleaser.update.yaml b/.goreleaser.update.yaml new file mode 100644 index 00000000..c87b01e5 --- /dev/null +++ b/.goreleaser.update.yaml @@ -0,0 +1,4 @@ +builds: + - skip: true +release: + prerelease: false