8000 Simplification of the release process. · utPLSQL/utPLSQL@688aad2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 688aad2

Browse files
committed
Simplification of the release process.
1 parent 03c231c commit 688aad2

File tree

9 files changed

+31
-34
lines changed

9 files changed

+31
-34
lines changed

.github/scripts/get_project_build_version.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
#!/usr/bin/env bash
2-
3-
#When building a new version from a release branch, the version is taken from release branch name
4-
if [[ "${CI_ACTION_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
5-
version=${CI_ACTION_REF_NAME#release\/}
6-
else
7-
#Otherwise, version is taken from the VERSION file
8-
version=`cat VERSION`
9-
#When on develop branch, add "-develop" to the version text
10-
if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then
2+
version=`cat VERSION`
3+
#When on develop branch, add "-develop" to the version text
4+
if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then
115
version=`sed -E "s/(v?[0-9]+\.[0-9]+\.[0-9]+).*/\1-develop/" <<< "${version}"`
12-
fi
136
fi
147
echo ${version}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
build_no=$(cat BUILD_NO)
4+
version=${CI_ACTION_REF_NAME}
5+
6+
echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV
7+
echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV
8+
echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV
9+
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash
22

3-
UTPLSQL_BUILD_NO=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} )
4-
UTPLSQL_VERSION=$(.github/scripts/get_project_version.sh)
3+
build_no=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} )
4+
version=$(.github/scripts/get_project_version.sh)
5< 8000 code>5

6-
echo "UTPLSQL_BUILD_NO=${UTPLSQL_BUILD_NO}" >> $GITHUB_ENV
7-
echo "UTPLSQL_VERSION=${UTPLSQL_VERSION}" >> $GITHUB_ENV
8-
echo UTPLSQL_BUILD_VERSION=$(echo ${UTPLSQL_VERSION} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${UTPLSQL_BUILD_NO}\4/") >> $GITHUB_ENV
9-
10-
echo "CURRENT_BRANCH=${CI_ACTION_REF_NAME}" >> $GITHUB_ENV
6+
echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV
7+
echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV
8+
echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV

.github/scripts/update_project_version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ sed -i -r "s/(sonar\.projectVersion=).*?/\1${UTPLSQL_VERSION}/" sonar-project.pr
1616

1717
echo Update VERSION file
1818
echo ${UTPLSQL_VERSION} > VERSION
19+
echo ${UTPLSQL_BUILD_NO} > BUILD_NO
1920

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245
- name: Push version update to repository
246246
id: push-version-number-update
247247
run: |
248-
git add sonar-project.properties VERSION source/* docs/*
248+
git add sonar-project.properties VERSION BUILD_NO source/* docs/*
249249
git commit -m 'Updated project version after build [skip ci]'
250250
git push --quiet origin HEAD:${CI_ACTION_REF_NAME}
251251

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: FranzDiebold/github-env-vars-action@v2 #https://github.com/marketplace/actions/github-environment-variables-action
2626

2727
- name: Set build version number env variables
28-
run: .github/scripts/set_version_numbers_env.sh
28+
run: .github/scripts/set_release_version_numbers_env.sh
2929

3030
- name: Update project version & build number in source code and documentation
3131
run: .github/scripts/update_project_version.sh

BUILD_NO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4194

development/releasing.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@
33
To create a release follow the below steps
44

55
## Release preparation
6-
- Create a **draft** of a Release with version number `vX.Y.X` sourced from the `main` branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests **since previous release**.
7-
To find issues closed after certain date use [advanced filters](https://help.github.com/articles/searching-issues-and-pull-requests/#search-by-open-or-closed-state).
8-
Example: [`is:issue closed:>2018-07-22`](https://github.com/utPLSQL/utPLSQL/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%3E2018-07-22+)
6+
- Create a **draft** of a Release with a new tag number `vX.Y.X` sourced from the `develop` branch on [github releases page](https://github.com/utPLSQL/utPLSQL/releases)
7+
- Populate release description using the `Generate release notes` button
8+
- Review the auto-generated release notes and update tem if needed
9+
- Split the default `## What's Changed` list into `## New features`, `## Enhancements`, `## Bug fixes`. See previous release notes for details
910

1011
## Performing a release
11-
- create the release branch from `develop` branch and make sure to name the release branch: `release/vX.Y.Z`
12-
- update, commit and push at least one file change in the release branch, to kick off a build on [GithubActions](https://github.com/utPLSQL/utPLSQL/actions) or kick-off a build manually for that branch after it was created on github.
13-
- wait for the build to complete successfully as it will update the version to be release number (without develop)
14-
- merge the release branch to `main` branch and publish [the previously prepared](#release-preparation) release draft.
12+
- Publish [the previously prepared](#release-preparation) release draft.
1513
- Wait for the [Github Actions `Release`](https://github.com/utPLSQL/utPLSQL/actions/workflows/release.yml) process to complete successfully. The process will upload release artifacts (`zip` and `tar.gz` files along with `md5`)
16-
- After Release build was completed successfully, merge the `main` branch back into `develop` branch. At this point, main branch and release tag should be at the same commit version and artifacts should be uploaded into Github release.
17-
- After develop branch was built, increase the version number in `VERSION` file to represent next planned release version.
14+
- After Release build was completed successfully, merge the `develop` branch into `main` branch. At this point, main branch and release tag should be at the same commit version and artifacts should be uploaded into Github release.
15+
- Increase the version number in the `VERSION` file on `develop` branch to open start next release version.
1816
- Clone `utplsql.githug.io` project and:
1917
- Add a new announcement about next version being released in `docs/_posts`. Use previous announcements as a template. Make sure to set date, time and post title properly.
2018
- Add the post to list in `mkdocs.yml` file in root directory of that repository.
2119
- Add the link to the post at the beginning of the `docs/index.md` file.
20+
- Send the announcement on Twitter(X) accoiunt abut utPLSQL release.
2221

2322
The following will happen:
24-
- build executed on branch `release/vX.Y.Z-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name
25-
- changes to those two files are committed and pushed back to release branch
26-
- when a Github release is published, a new tag is added in on the repository and a release build is executed
27-
- With Release build, the documentation for new release is published on `utplsql.github.io` and installation archives are added to the release.
23+
- When a Github release is published, a new tag is added in on the repository and a release build is executed
24+
- With Release action, the documentation for new release is published on `utplsql.github.io` and installation archives are added to the release.
2825

2926
# Note:
3027
The utPLSQL installation files are uploaded by the release build process as release artifacts (separate `zip` and `tar.gz` files).

0 commit comments

Comments
 (0)
0