diff --git a/.github/workflows/NEW_release.yml b/.github/workflows/NEW_release.yml deleted file mode 100644 index 5f9c27fa8..000000000 --- a/.github/workflows/NEW_release.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Create Draft Release - -on: - workflow_dispatch: - inputs: - ref: - description: "Branch, tag or SHA to release" - required: true - type: string -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8.5.1 - - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: "${{ inputs.ref }}" - fetch-depth: 0 - - - name: Generate version - id: generate-version - uses: paulhatch/semantic-version@v5.0.3 - with: - tag_prefix: "v" - major_pattern: "^([A-Za-z]+.)*!:.*$" - major_regexp_flags: "g" - minor_pattern: "feat" - version_format: "v${major}.${minor}.${patch}" - - - name: Print release version - run: echo "NEW_VERSION=${{ steps.generate-version.outputs.version }}" - - - name: Publish Release - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: "${{ steps.generate-version.outputs.version }}" - name: ${{ steps.generate-version.outputs.version }} - draft: true - makeLatest: false - prerelease: true - allowUpdates: true - updateOnlyUnreleased: true - generateReleaseNotes: true \ No newline at end of file diff --git a/.github/workflows/NEW_update_changelog.yml b/.github/workflows/NEW_update_changelog.yml deleted file mode 100644 index 99d49eb44..000000000 --- a/.github/workflows/NEW_update_changelog.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Update Changelog - -on: - release: - types: [published] - -jobs: - update: - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.release.target_commitish }} - - - name: Update Changelog - uses: stefanzweifel/changelog-updater-action@v1 - with: - latest-version: ${{ github.event.release.tag_name }} - release-notes: ${{ github.event.release.body }} - - - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v5 - with: - branch: ${{ github.event.release.target_commitish }} - commit_message: Update CHANGELOG - file_pattern: CHANGELOG.md \ No newline at end of file diff --git a/.github/workflows/OLD_github_release.yml b/.github/workflows/OLD_github_release.yml deleted file mode 100644 index a60b4c794..000000000 --- a/.github/workflows/OLD_github_release.yml +++ /dev/null @@ -1,151 +0,0 @@ -name: OLD Create Release - -on: - workflow_dispatch: - inputs: - branch: - description: "The branch to run the release on" - required: true - type: string - version: - description: "Release Version" - required: true - type: string - preRelease: - required: false - default: false - type: boolean - draft: - required: false - default: false - type: boolean - makeLatest: - required: false - default: true - type: boolean - generateChangelog: - required: false - default: false - type: boolean - releaseNotesURL: - required: false - type: string - publishEvent: - required: false - type: boolean - default: false - eventBranch: - required: false - type: string - default: "main" - commitMessage: - required: false - type: string - default: "" - -permissions: - contents: write - -jobs: - keel-release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ inputs.branch }} - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: "1.20" - - run: git fetch --force --tags - - # creating a tag so goreleaser knows what to release - - name: Create Release Tag - uses: rickstaa/action-create-tag@v1 - id: "tag_create" - with: - tag: "${{ inputs.version }}" - tag_exists_error: false - message: "Keel release ${{ inputs.version }}" - - - name: Set variables for homebrew - id: set-brew-envvars - run: | - { - if [ ${{ inputs.preRelease }} == true ]; then - repo="homebrew-keel-prerelease" - alias="keel-prerelease" - else - repo="homebrew-keel" - alias="keel" - fi - echo "HOMEBREW_REPO=$repo" >> "$GITHUB_OUTPUT" - echo "HOMEBREW_ALIAS=$alias" >> "$GITHUB_OUTPUT" - } - - - name: Run GoReleaser - id: goreleaser - uses: goreleaser/goreleaser-action@v4 - with: - distribution: goreleaser - version: 1.13.0 - args: release - #testing only - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # HOMEBREW_REPO: "homebrew-keel-prerelease" - # HOMEBREW_ALIAS: "keel-prerelease" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HOMEBREW_REPO: ${{ steps.set-brew-envvars.outputs.HOMEBREW_REPO }} - HOMEBREW_ALIAS: ${{ steps.set-brew-envvars.outputs.HOMEBREW_ALIAS }} - GORELEASER_CURRENT_TAG: ${{ inputs.version }} - - - name: Update CHANGELOG - id: changelog - if: ${{ inputs.generateChangelog }} - uses: saadmk11/changelog-ci@v1.1.2 - with: - release_version: "${{ inputs.version }}" - - - name: Get Changelog Output - run: | - echo "${{ steps.changelog.outputs.changelog }}" - echo "${{ steps.changelog.outputs.changelog }}" >> $GITHUB_STEP_SUMMARY - - # Goreleaser won't update a draft release, so you have to update the release after to tune release params - - name: Update goreleaser release with the changelogs - id: update_release - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: "${{ inputs.version }}" - name: "Keel release ${{ inputs.version }}" - draft: ${{ inputs.draft }} - allowUpdates: true - updateOnlyUnreleased: true - prerelease: ${{ inputs.preRelease }} - makeLatest: ${{ inputs.makeLatest }} - body: "Keel release ${{ inputs.version }}. Release notes can be found at ${{ inputs.releaseNotesURL || steps.changelog.outputs.changelog }}" - - - name: Fire Release Event with Changelog - if: ${{ inputs.publishEvent && inputs.generateChangelog }} - id: release_event_changelog - uses: peter-evans/repository-dispatch@v2.1.1 - with: - token: ${{ secrets.PAT }} - repository: teamkeel/backend - event-type: "new-runtime-release" - client-payload: '{"version": "${{ inputs.version }}", "changelog": "${{ steps.changelog.outputs.changelog }}", "baseBranch": "${{ inputs.eventBranch }}", "triggeringCommitMessage": "${{ inputs.commitMessage }}"}' - - - name: Fire Release Event - if: ${{ inputs.publishEvent && inputs.generateChangelog == false }} - id: release_event - uses: peter-evans/repository-dispatch@v2.1.1 - with: - token: ${{ secrets.PAT }} - repository: teamkeel/backend - event-type: "new-runtime-release" - client-payload: '{"version": "${{ inputs.version }}", "baseBranch": "${{ inputs.eventBranch }}", "triggeringCommitMessage": "${{ inputs.commitMessage }}"}' diff --git a/.github/workflows/OLD_new_prerelease.yml b/.github/workflows/OLD_new_prerelease.yml deleted file mode 100644 index 2e8e9bb38..000000000 --- a/.github/workflows/OLD_new_prerelease.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: OLD Initiate Pre-Release - -on: - #push: - # branches: - # - main - # tags-ignore: - # - "*" - workflow_dispatch: - -jobs: - setup: - name: Setup workflows - runs-on: ubuntu-latest - if: startsWith( github.event.head_commit.message, 'feat' ) || startsWith( github.event.head_commit.message, 'fix' ) || contains(github.event.head_commit.message, '!:') || github.event_name == 'workflow_dispatch' - steps: - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8.5.1 - - run: echo "Running pre-release for branch *${{ github.ref_name }}*" - - pre-release: - if: github.event_name == 'push' || github.ref_name == 'main' - needs: [setup] - uses: ./.github/workflows/pre_release.yml - with: - publishTag: "next" - versionFormat: "${major}.${minor}.${patch}-prerelease${increment}" - secrets: inherit - - dev-release: - if: github.event_name == 'workflow_dispatch' - needs: [setup] - uses: ./.github/workflows/pre_release.yml - with: - publishTag: "dev" - versionFormat: "${major}.${minor}.${patch}-${{ github.ref_name }}${increment}" - secrets: inherit diff --git a/.github/workflows/OLD_npm_release.yml b/.github/workflows/OLD_npm_release.yml deleted file mode 100644 index 12e5d5c3c..000000000 --- a/.github/workflows/OLD_npm_release.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: OLD NPM Release - -on: - workflow_dispatch: - inputs: - version: - description: "Release Version" - required: true - type: string - publishTag: - description: "Tag under which to release the packages (defaults to latest)" - required: false - default: "latest" - type: string - dryRun: - description: "true if dry run release, false otherwise" - required: false - default: false - type: boolean - -jobs: - npm_release: - name: NPM Release Matrix - runs-on: ubuntu-latest - strategy: - matrix: - package: - [ - "wasm", - "functions-runtime", - "testing-runtime", - "client-react", - "client-react-query", - ] - steps: - - uses: actions/setup-go@v3 - with: - go-version: "1.20" - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8.5.1 - - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install Go deps - if: inputs.publishTag != 'latest' - run: go mod download - - - name: Generate wasm binary - if: ${{ matrix.package == 'wasm' && inputs.publishTag != 'latest' }} - run: make wasm - - - name: Install ${{ matrix.package }} publish dependencies - working-directory: ./packages/${{ matrix.package }} - run: pnpm install --frozen-lockfile - - - name: "Update NPM version ${{ matrix.package }}" - if: inputs.publishTag != 'latest' - uses: reedyuk/npm-version@1.2.1 - with: - version: ${{ inputs.version }} - package: ./packages/${{ matrix.package }} - - - name: NPM Publish ${{ matrix.package }} - uses: JS-DevTools/npm-publish@v2 - with: - token: ${{ secrets.NPM_TOKEN }} - tag: ${{ inputs.publishTag }} - package: ./packages/${{ matrix.package }} - dry-run: ${{ inputs.dryRun }} - strategy: all - ignore-scripts: false - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - outputs: - version: ${{ inputs.version }} diff --git a/.github/workflows/OLD_pre_release.yml b/.github/workflows/OLD_pre_release.yml deleted file mode 100644 index 0aec29ff5..000000000 --- a/.github/workflows/OLD_pre_release.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: OLD Make Pre Release - -on: - workflow_dispatch: - inputs: - versionFormat: - description: "Ref of where the release should be marked" - required: true - type: string - publishTag: - description: "Release Version" - required: true - type: string - -jobs: - setup: - name: Generate Version - runs-on: ubuntu-latest - steps: - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8.5.1 - - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - # generate a new version number based on conventional commit versioning - - name: Generate version - id: generate-version - uses: paulhatch/semantic-version@v5.0.3 - with: - tag_prefix: "v" - major_pattern: "^([A-Za-z]+.)*!:.*$" - major_regexp_flags: "g" - minor_pattern: "feat" - version_format: ${{ inputs.versionFormat}} - - - name: Print release version - run: echo "NEW_VERSION=${{ steps.generate-version.outputs.version }}" - - outputs: - version: ${{ steps.generate-version.outputs.version }} - version_tag: ${{ steps.generate-version.outputs.version_tag}} - - npm_release: - needs: [setup] - uses: ./.github/workflows/npm_release.yml - with: - version: ${{ needs.setup.outputs.version_tag }} - publishTag: ${{ inputs.publishTag }} - dryRun: false - secrets: inherit - - github_release: - needs: [setup, npm_release] - uses: ./.github/workflows/github_release.yml - with: - branch: ${{ github.ref_name }} - version: ${{ needs.setup.outputs.version_tag }} - preRelease: true - draft: false - makeLatest: false - generateChangelog: false - publishEvent: ${{ github.event_name != 'workflow_dispatch' }} - commitMessage: ${{ github.event.head_commit.message }} - secrets: inherit diff --git a/.github/workflows/OLD_prepare_keel_release.yml b/.github/workflows/OLD_prepare_keel_release.yml deleted file mode 100644 index 1150d213c..000000000 --- a/.github/workflows/OLD_prepare_keel_release.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: OLD Prepare Keel Release - -on: - workflow_dispatch: - inputs: - preReleaseVersion: - description: "The tag to release from" - required: true - type: string - releaseNotesUrl: - description: "URL to release notes for version" - required: false - type: string - backendBranch: - description: "The backend branch to update with this new Keel version" - required: false - type: string - default: "main" - -jobs: - create_branch: - name: Create release branch - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - repository: teamkeel/keel - ref: "${{ inputs.preReleaseVersion }}" - fetch-depth: 0 - - # generate a new version number based on semantic versioning - - name: Generate version - id: generate-version - uses: paulhatch/semantic-version@v5.0.3 - with: - tag_prefix: "v" - major_pattern: "^([A-Za-z]+.)*!:.*$" - major_regexp_flags: "g" - minor_pattern: "feat" - version_format: "${major}.${minor}.${patch}" - - - name: Create new release branch - uses: peterjgrainger/action-create-branch@v2.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - branch: "refs/heads/release/${{ steps.generate-version.outputs.version_tag }}" - sha: ${{ github.sha }} - - - name: Checkout repository - uses: actions/checkout@v3 - with: - repository: teamkeel/keel - ref: release/${{ steps.generate-version.outputs.version_tag }} - fetch-depth: 0 - outputs: - version: ${{ steps.generate-version.outputs.version }} - version_tag: ${{ steps.generate-version.outputs.version_tag}} - - npm_release: - uses: ./.github/workflows/npm_release.yml - needs: [create_branch] - with: - version: ${{ needs.create_branch.outputs.version_tag }} - publishTag: "rc-next" - dryRun: false - secrets: inherit - - github_release: - needs: [create_branch, npm_release] - uses: ./.github/workflows/github_release.yml - with: - version: ${{ needs.create_branch.outputs.version_tag }} - preRelease: false - draft: true - makeLatest: false - generateChangelog: false - branch: "release/${{ needs.create_branch.outputs.version_tag }}" - releaseNotesURL: ${{ inputs.releaseNotesUrl }} - eventBranch: ${{ inputs.backendBranch }} - publishEvent: true - secrets: inherit diff --git a/.github/workflows/OLD_publish_keel_release.yml b/.github/workflows/OLD_publish_keel_release.yml deleted file mode 100644 index d8f9d1373..000000000 --- a/.github/workflows/OLD_publish_keel_release.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: OLD Publish Keel Release - -on: - workflow_dispatch: - inputs: - version: - description: "Release Version" - required: true - type: string - -jobs: - setup: - name: Checkout release branch - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - repository: teamkeel/keel - ref: "release/${{ inputs.version }}" - fetch-depth: 0 - - npm_release: - needs: [setup] - runs-on: ubuntu-latest - strategy: - matrix: - package: - [ - "wasm", - "functions-runtime", - "testing-runtime", - "client-react", - "client-react-query", - ] - steps: - - uses: actions/setup-node@v3 - with: - node-version: 18 - token: ${{ secrets.NPM_TOKEN }} - - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8.5.1 - - - name: Set NPM packages to latest - run: npm dist-tag add @teamkeel/${{ matrix.package }}@${{ inputs.version }} latest - - github_release: - name: Make Github Release - runs-on: ubuntu-latest - needs: [npm_release] - steps: - - name: Publish Release - id: publish_release - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: "${{ inputs.version }}" - draft: false - makeLatest: true - prerelease: false - allowUpdates: true - updateOnlyUnreleased: true diff --git a/.github/workflows/update_npm_packages_dist.yml b/.github/workflows/update_npm_packages_dist.yml index 689a8041e..039982d46 100644 --- a/.github/workflows/update_npm_packages_dist.yml +++ b/.github/workflows/update_npm_packages_dist.yml @@ -1,6 +1,8 @@ name: Update SDKs dist-tags run-name: Update SDKs ${{ inputs.version }} with '${{ inputs.publishTag }}' +# Currently not working due to authorisation issue + on: workflow_dispatch: inputs: