Skip to content

Commit

Permalink
ci: Align tags with semver specs (#3136)
Browse files Browse the repository at this point in the history
* docs: Polish VISION to make it more clear

Signed-off-by: Xuanwo <[email protected]>

* ci: Align tags with semver specs

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Sep 19, 2023
1 parent d82ca9a commit d39a275
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bindings_haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
# release:
# name: Release
# runs-on: ubuntu-latest
# if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc')"
# if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')"
# needs: [package]
# steps:
# - uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bindings_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ jobs:
run: cp LICENSE NOTICE ./bindings/nodejs

- name: Publish
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc')"
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')"
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public --provenance
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bindings_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, 'rc')"
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')"
needs: [macos, linux, windows]
steps:
- uses: actions/download-artifact@v3
Expand Down
29 changes: 5 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')"
steps:
- uses: actions/checkout@v3
- name: Checkout python env
Expand All @@ -45,48 +46,28 @@ jobs:

- name: Publish opendal
working-directory: "core"
run: |
if [[ "${{ github.ref }}" == *rc* ]]; then
cargo publish --all-features --dry-run --no-verify
else
cargo publish --all-features
fi
run: cargo publish --all-features
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish object_store_opendal
working-directory: "integrations/object_store"
run: |
if [[ "${{ github.ref }}" == *rc* ]]; then
cargo publish --dry-run --no-verify
else
cargo publish
fi
run: cargo publish
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish oli
working-directory: "bin/oli"
run: |
if [[ "${{ github.ref }}" == *rc* ]]; then
cargo publish --dry-run --no-verify
else
cargo publish
fi
run: cargo publish
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Publish oay
working-directory: "bin/oay"
run: |
if [[ "${{ github.ref }}" == *rc* ]]; then
cargo publish --dry-run --no-verify
else
cargo publish
fi
run: cargo publish
env:
LD_LIBRARY_PATH: ${{ env.JAVA_HOME }}/lib/server:${{ env.LD_LIBRARY_PATH }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
tags:
# Staging JARs on Apache Nexus repository for RCs. Read more on
# https://opendal.apache.org/docs/contributing/release#release-maven-artifacts
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
# tar source code
release_version=${OPENDAL_VERSION}
# rc versions
rc_version=${OPENDAL_VERSION_RC:rc1}
rc_version=${OPENDAL_VERSION_RC:rc.1}
# Corresponding git repository branch
git_branch=release-${release_version}-${rc_version}

Expand Down
24 changes: 13 additions & 11 deletions website/docs/contributing/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Take [Bump to version 0.36.0](https://github.com/apache/incubator-opendal/pull/2

After bump version PR gets merged, we can create a GitHub release:

- Create a tag at `main` branch on the `Bump Version` / `Patch up version` commit: `git tag -s "v0.36.0-rc1"`, please correctly check out the corresponding commit instead of directly tagging on the main branch.
- Create a tag at `main` branch on the `Bump Version` / `Patch up version` commit: `git tag -s "v0.36.0-rc.1"`, please correctly check out the corresponding commit instead of directly tagging on the main branch.
- Push tags to GitHub: `git push --tags`.
- Create Release on the newly created tag
- If there are breaking changes, please add the content from `upgrade.md` before.
Expand All @@ -95,8 +95,8 @@ we will abandon that version and prepare for the next one.
Our release page will only display ASF releases instead of GitHub Releases.

- `opendal_version`: the version for opendal, like `0.36.0`.
- `release_version`: the version for voting, like `0.36.0-rc1`.
- `rc_version`: the minor version for voting, like `rc1`.
- `release_version`: the version for voting, like `0.36.0-rc.1`.
- `rc_version`: the minor version for voting, like `rc.1`.

### Create an ASF Release

Expand Down Expand Up @@ -137,7 +137,7 @@ svn co https://dist.apache.org/repos/dist/dev/incubator/opendal opendal-dist-dev

Then, upload the artifacts:

> The `${release_version}` here should be like `0.36.0-rc1`
> The `${release_version}` here should be like `0.36.0-rc.1`
```shell
cd opendal-dist-dev
Expand Down Expand Up @@ -182,7 +182,7 @@ please cancel the release for the current `release_version`, _increase th RC cou
As an incubating project, OpenDAL requires votes from both the OpenDAL Community and Incubator Community.

- `opendal_version`: the version for opendal, like `0.36.0`.
- `release_version`: the version for voting, like `0.36.0-rc1`.
- `release_version`: the version for voting, like `0.36.0-rc.1`.
- `maven_artifact_number`: the number for Maven staging artifacts, like `1010`.

Specifically, the `maven_artifact_number` can be found by searching "opendal" on https://repository.apache.org/#stagingRepositories.
Expand Down Expand Up @@ -214,11 +214,12 @@ Keys to verify the release candidate:
https://downloads.apache.org/incubator/opendal/KEYS
Git branch for the release:
Git tag for the release:
https://github.com/apache/incubator-opendal/tree/release-${release_version}
https://github.com/apache/incubator-opendal/releases/tag/${release_version}
Maven staging repo:
https://repository.apache.org/content/repositories/orgapacheopendal-${maven_artifact_number}/
Please download, verify, and test.
Expand Down Expand Up @@ -323,11 +324,12 @@ This release has been signed with a PGP available here:
https://downloads.apache.org/incubator/opendal/KEYS
Git branch for the release:
Git tag for the release:
https://github.com/apache/incubator-opendal/tree/release-${release_version}
https://github.com/apache/incubator-opendal/releases/tag/${release_version}
Maven staging repo:
https://repository.apache.org/content/repositories/orgapacheopendal-${maven_artifact_number}/
Please download, verify, and test.
Expand Down Expand Up @@ -402,7 +404,7 @@ Example: <https://lists.apache.org/thread/h3x9pq1djpg76q3ojpqmdr3d0o03fld1>
### Push the release git tag

- `opendal_version`: the version for opendal, like `0.36.0`.
- `release_version`: the version for the passed candidate, like `0.36.0-rc1`.
- `release_version`: the version for the passed candidate, like `0.36.0-rc.1`.

```shell
# Checkout the tags that passed VOTE
Expand All @@ -416,7 +418,7 @@ git push origin ${opendal_version}
### Publish artifacts to SVN RELEASE branch

- `opendal_version`: the version for opendal, like `0.36.0`.
- `release_version`: the version for voting, like `0.36.0-rc1`.
- `release_version`: the version for voting, like `0.36.0-rc.1`.

```shell
svn mv https://dist.apache.org/repos/dist/dev/incubator/opendal/${release_version} https://dist.apache.org/repos/dist/release/incubator/opendal/${opendal_version} -m "Release ${opendal_version}"
Expand Down

0 comments on commit d39a275

Please sign in to comment.