diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d720afb..8f21765 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -10,6 +10,9 @@ jobs: draft-a-release: name: Draft a release runs-on: ubuntu-latest + permissions: + contents: write + issues: write steps: - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 - id: get_data @@ -39,8 +42,9 @@ jobs: tar -cvf artifacts.tar.gz *-installer - name: Draft a release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 + uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd with: - draft: true - generate_release_notes: true - files: artifacts.tar.gz + immutableCreate: true + generateReleaseNotes: true + artifacts: "artifacts.tar.gz" + prerelease: true diff --git a/RELEASING.md b/RELEASING.md index 8ee6cce..5b3e481 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -33,8 +33,13 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [maintainers](MAINTAINERS.md). -1. Create a tag, e.g. 1.0.0.0, and push it to this GitHub repository. -2. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and a draft release will be created. -3. This draft release triggers the [jenkins release workflow](https://build.ci.opensearch.org/job/sql-odbc-release) as a result of which the driver is released and published on artifacts (https://artifacts.opensearch.org/opensearch-clients/odbc/). Please note, that the release workflow is triggered only if created release is in draft state. Manual update on the [download page](https://opensearch.org/downloads.html#drivers) is required after that, see [website repo](https://github.com/opensearch-project/project-website/tree/main/_artifacts/opensearch-drivers). -4. Once the above release workflow is successful, the drafted release on GitHub is published automatically. +1. Identify the commit to release and create a tag on it, pushing to the upstream repo: +``` +git fetch origin +git tag +git push origin +``` +2. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and a pre-release will be created. +3. This pre-release triggers the [jenkins release workflow](https://build.ci.opensearch.org/job/sql-odbc-release) as a result of which the driver is released and published on artifacts (https://artifacts.opensearch.org/opensearch-clients/odbc/). Please note that the release workflow is triggered only if created release is in pre-release state. Manual update on the [download page](https://opensearch.org/downloads.html#drivers) is required after that, see [website repo](https://github.com/opensearch-project/project-website/tree/main/_artifacts/opensearch-drivers). +4. Once the above release workflow is successful, it creates a GitHub issue requesting maintainers to manually publish the pre-release to release on GitHub. 5. Increment `DRIVER_PACKAGE_VERSION` in [src/CMakeLists.txt](src/CMakeLists.txt) to the next iteration, e.g. 1.0.0.1 See [example](https://github.com/opensearch-project/sql-odbc/pull/47). diff --git a/jenkins/release.jenkinsFile b/jenkins/release.jenkinsFile index cd5a5a5..2102b0f 100644 --- a/jenkins/release.jenkinsFile +++ b/jenkins/release.jenkinsFile @@ -1,4 +1,4 @@ -lib = library(identifier: 'jenkins@4.4.0', retriever: modernSCM([ +lib = library(identifier: 'jenkins@13.0.1', retriever: modernSCM([ $class: 'GitSCMSource', remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ])) @@ -7,8 +7,7 @@ standardReleasePipelineWithGenericTrigger( overrideDockerImage: 'opensearchstaging/ci-runner:release-centos7-clients-v4', tokenIdCredential: 'jenkins-sql-odbc-generic-webhook-token', causeString: 'A tag was cut on opensearch-project/sql-odbc repository causing this workflow to run', - downloadReleaseAsset: true, - publishRelease: true) { + downloadReleaseAsset: true) { publishToArtifactsProdBucket( assumedRoleName: 'sql-odbc-upload-role', source: "${WORKSPACE}/windows32-installer/OpenSearch-SQL-ODBC-Driver-32-bit-${tag}-Windows.msi",