diff --git a/.github/workflows/build_go_lib.yml b/.github/workflows/build_go_lib.yml deleted file mode 100644 index 55ee010828f0d..0000000000000 --- a/.github/workflows/build_go_lib.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Build Go Library - -env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - -on: - workflow_dispatch: - inputs: - release_branch: - description: "Staging branch to run release from" - -jobs: - smoke-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.release_branch }} - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Test - run: pnpm -- turbo run test --filter=cli --color - - darwin: - needs: [smoke-test] - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.release_branch }} - - run: git fetch origin --tags - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser-pro - version: latest - install-only: true - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Build Artifacts - run: cd cli && make build-lib-turbo-darwin - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: turbo-lib-darwin-${{ inputs.release_branch }} - path: cli/dist-darwin - - # compiles linux and windows in a container - cross: - needs: [smoke-test] - runs-on: ubuntu-latest - container: - image: docker://ghcr.io/vercel/turbo-cross:v1.18.5 - steps: - - uses: actions/checkout@v3 - with: - ref: "${{ inputs.release_branch }}" - - run: git fetch origin --tags - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser-pro - version: latest - install-only: true - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Build Artifacts - run: cd cli && make build-lib-turbo-cross - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: turbo-lib-cross-${{ inputs.release_branch }} - path: cli/dist-cross diff --git a/.github/workflows/release-turborepo.yml b/.github/workflows/release-turborepo.yml deleted file mode 100644 index b373b823dd3e2..0000000000000 --- a/.github/workflows/release-turborepo.yml +++ /dev/null @@ -1,160 +0,0 @@ -name: Release From Branch - -env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - -on: - workflow_dispatch: - inputs: - release_branch: - description: "Staging branch to run release from" - -jobs: - smoke-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.release_branch }} - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Test - run: pnpm -- turbo run test --filter=cli --color - - darwin: - name: "Build Darwin Binares" - needs: [smoke-test] - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.release_branch }} - - run: git fetch origin --tags - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser-pro - version: latest - install-only: true - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Build Artifacts - run: cd cli && make publish-turbo-darwin - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: turbo-artifacts-darwin - path: cli/dist-darwin - - # compiles linux and windows in a container - cross: - name: "Build Linux and Windows Binaries" - needs: [smoke-test] - runs-on: ubuntu-latest - container: - image: docker://ghcr.io/vercel/turbo-cross:v1.18.5 - steps: - - uses: actions/checkout@v3 - with: - ref: "${{ inputs.release_branch }}" - - run: git fetch origin --tags - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser-pro - version: latest - install-only: true - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Build Artifacts - run: cd cli && make publish-turbo-cross - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: turbo-artifacts-cross - path: cli/dist-cross - - final-publish: - needs: [cross, darwin] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - ref: "${{ inputs.release_branch }}" - - run: git fetch origin --tags - - uses: ./.github/actions/setup-node - with: - enable-corepack: false - - uses: ./.github/actions/setup-go - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - - name: Configure git - run: | - git config --global user.name 'Turbobot' - git config --global user.email 'turbobot@vercel.com' - - - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 - with: - distribution: goreleaser-pro - version: latest - install-only: true - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - # Download the prebuilt binaries for each platform, - # combine them into a single dist-combined folder, - # then delegate to goreleaser / Makefile for deploy. - # Finally, set up a PR for the branch we released off of - - name: Download Cross-compiled Artifacts - uses: actions/download-artifact@v3 - with: - name: turbo-artifacts-cross - path: cli/dist-cross - - - name: Download Darwin Artifacts - uses: actions/download-artifact@v3 - with: - name: turbo-artifacts-darwin - path: cli/dist-darwin - - - name: Combine Artifacts - run: cd cli && mkdir -p dist-combined && cp -a dist-cross/. dist-combined/ && cp -a dist-darwin/. dist-combined/ - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - - name: Release - run: cd cli && make publish - env: - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - - - uses: repo-sync/pull-request@v2 - with: - source_branch: ${{ inputs.release_branch }} - destination_branch: main - pr_title: Merge release branch ${{ inputs.release_branch }} - pr_body: ":crown: Merge release branch back to main" - pr_reviewer: ${{ github.actor }},gsoltis - pr_allow_empty: true - github_token: ${{ secrets.TURBOBOT }} diff --git a/.github/workflows/stage.yml b/.github/workflows/turborepo-release-step-1.yml similarity index 96% rename from .github/workflows/stage.yml rename to .github/workflows/turborepo-release-step-1.yml index bc4d47da482dc..fd7da5172ab50 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/turborepo-release-step-1.yml @@ -1,4 +1,4 @@ -name: Create Release Branch +name: 1. Turborepo Release (release branch) # TODO: Once we have confidence with the release process, add an # input to allow automatically kicking off the downstream release. diff --git a/.github/workflows/build_go_binary.yml b/.github/workflows/turborepo-release-step-2.yml similarity index 98% rename from .github/workflows/build_go_binary.yml rename to .github/workflows/turborepo-release-step-2.yml index 2ff0f0e1bbc5c..49be7726c858a 100644 --- a/.github/workflows/build_go_binary.yml +++ b/.github/workflows/turborepo-release-step-2.yml @@ -1,4 +1,4 @@ -name: Build Go Binary +name: 2. Turborepo Release (go binary) env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/build_rust.yml b/.github/workflows/turborepo-release-step-3.yml similarity index 98% rename from .github/workflows/build_rust.yml rename to .github/workflows/turborepo-release-step-3.yml index 2dc21dd30bf7f..d525955b3e213 100644 --- a/.github/workflows/build_rust.yml +++ b/.github/workflows/turborepo-release-step-3.yml @@ -1,4 +1,4 @@ -name: Build Rust Wrapper +name: 3. Turborepo Release (rust binary & publish) on: workflow_dispatch: @@ -121,7 +121,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: github_token: ${{secrets.TURBOBOT}} - workflow: build_go_binary.yml + workflow: turborepo-release-step-2.yml workflow_conclusion: success branch: ${{ inputs.release_branch }} path: go-artifacts diff --git a/release.md b/release.md index a1b45594d02e4..78e27fadc48e4 100644 --- a/release.md +++ b/release.md @@ -50,10 +50,10 @@ We have a multi step release process for Turborepo right now. **NOTE**: The steps below _must_ be run serially, in the order specified. -1. Create a release branch by triggering the [Create Release Branch](https://github.com/vercel/turbo/actions/workflows/stage.yml) workflow +1. Create a release branch by triggering the [1. Turborepo Release (release branch)](https://github.com/vercel/turbo/actions/workflows/turborepo-release-step-1.yml) workflow 1. Specify the semver increment using the SemVer Increment field -2. Build the Go Library by triggering the [Build Go Library](https://github.com/vercel/turbo/actions/workflows/build_go_lib.yml) workflow. +1. Build the Go Binary by triggering the [2. Turborepo Release (go binary)](https://github.com/vercel/turbo/actions/workflows/turborepo-release-step-2.yml) workflow. 1. Specify the release branch (example: `staging-1.7.0-canary.1`) in _both_ the "use workflow from", and "Staging branch to release from" fields. -3. Build the Rust Wrapper by triggering the [Build Rust Wrapper](https://github.com/vercel/turbo/actions/workflows/build_rust.yml) workflow. +1. Build the Rust Wrapper by triggering the [3. Turborepo Release (rust binary & publish)](https://github.com/vercel/turbo/actions/workflows/turborepo-release-step-3.yml) workflow. 1. Specify the release branch (example: `staging-1.7.0-canary.1`) in _both_ the "use workflow from", and "Staging branch to release from" fields. (this should match step 2.1 above) -4. Open a PR and merge the release branch back into `main` +1. After publish, open a PR to merge the release branch created in step 1 back into `main`