Fix release workflow (#3686)

* Checkout full history during release (#3539)

* Fix release workflow

* Add git tag commands as example

* Checkout full depth for changelog

Co-authored-by: Cayman <caymannava@gmail.com>
This commit is contained in:
Lion - dapplion
2022-02-02 02:59:54 +05:30
committed by GitHub
parent 19bec296e1
commit 6a713019bf
4 changed files with 20 additions and 5 deletions

View File

@@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
@@ -26,13 +28,12 @@ jobs:
id: get_prev_tag
run: node scripts/get_prev_tag.js
env:
CURRENT_TAG: ${{ steps.tag.outputs.tag }}
CURRENT_TAG: ${{ steps.get_tag.outputs.tag }}
IGNORE_PATTERN: beta
outputs:
is_beta: ${{ contains(github.ref, 'beta') }}
tag: ${{ steps.tag.outputs.tagname }}
tag: ${{ steps.get_tag.outputs.tag }}
prev_tag: ${{ steps.get_prev_tag.outputs.prev_tag }}
version: ${{ steps.get_version.outputs.version }}
npm:
name: Publish to NPM Registry
@@ -43,6 +44,8 @@ jobs:
steps:
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Needs full depth for changelog generation
- uses: actions/setup-node@v2
with:
node-version: "lts/gallium"

View File

@@ -6,9 +6,14 @@
In the same day:
1. The team selects a commit from `master` as a "stable target" for a new version release. As example target next version is `v0.34.0`. Master package.json versions are already at `v0.34.0` to release nightly versions.
1. The team selects a commit from `master` as a "stable target" for a new version release. As example target next version is `v0.34.0`, commit `9fceb02`. Master package.json versions are already at `v0.34.0` to release nightly versions.
2. The selected commit is branched into a separate release branch (Example: `v0.34.x`)
3. The selected commit is tagged as `v0.34.0-beta.0`, released, and published for testing as a Pre-Release
```
export TAG=v0.34.0-beta.0 && git tag -a $TAG 9fceb02 -m "$TAG" && git push origin $TAG
```
4. The team creates a PR to bump `master` to the next version (in the example: `v0.35.0`) and continues releasing nightly builds.
```
@@ -19,6 +24,10 @@ After 3-5 days of testing:
5. Tag final stable commit as `v0.34.0`, release and publish the stable release. This commit will be in `v0.34.x` branch and may note be on `master` if beta candidate required bug fixes.
```
export TAG=v0.34.0 git && tag -a $TAG 9fceb02 -m "$TAG" && git push origin $TAG
```
## Pre-Releases
A `v.beta.x` release is published and tagged (Example: `v0.33.0-beta.0`) when the team selects a commit as a "stable target" candidate.

View File

@@ -36,6 +36,9 @@ const knownAuthors = {
"58883403+q9f@users.noreply.github.com": "q9f",
"fredrik@ethereum.org": "fredriksvantes",
"mpetrunic@users.noreply.github.com": "mpetrunic",
"ammar1lakho@gmail.com": "ammarlakho",
"dadepo@gmail.com": "dadepo",
"hi@enriqueortiz.dev": "Evalir",
};
const fromTag = process.argv[2];

View File

@@ -30,7 +30,7 @@ async function run() {
const tags = stdout.trim().split("\n");
for (const tag of tags) {
if (tag !== CURRENT_TAG && !tag.includes(IGNORE_PATTERN)) {
console.log(`echo ::set-output name=prev_tag::${tag}`);
console.log(`::set-output name=prev_tag::${tag}`);
return;
}
}