-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2136 from demergent-labs/update_release_process
Update release process
- Loading branch information
Showing
16 changed files
with
183 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Prerequisite | ||
|
||
This action assumes that the repository has already been checked out before | ||
calling the action, typically using `actions/checkout@v4`. If you have not | ||
checked out the code in a previous step, make sure to do so to avoid errors. | ||
|
||
This action does **not** perform a checkout action itself because it would be | ||
redundant. This action is part of the repository’s codebase, so if the code | ||
hasn’t already been checked out, the action itself wouldn't even be available to | ||
call. Additionally, rerunning a checkout at this stage could potentially | ||
overwrite any earlier `actions/checkout` step with different parameters, such as | ||
checking out a specific branch. | ||
|
||
## Example Usage | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: get-dfx-version | ||
uses: ./.github/actions/get_dfx_version | ||
|
||
- run: echo ${{ steps.get-dfx-version.outputs.dfx-version }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Prerequisite | ||
|
||
This action assumes that the repository has already been checked out before | ||
calling the action, typically using `actions/checkout@v4`. If you have not | ||
checked out the code in a previous step, make sure to do so to avoid errors. | ||
|
||
This action does **not** perform a checkout action itself because it would be | ||
redundant. This action is part of the repository’s codebase, so if the code | ||
hasn’t already been checked out, the action itself wouldn't even be available to | ||
call. Additionally, rerunning a checkout at this stage could potentially | ||
overwrite any earlier `actions/checkout` step with different parameters, such as | ||
checking out a specific branch. | ||
|
||
## Example Usage | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: get-node-version | ||
uses: ./.github/actions/get_node_version | ||
|
||
- run: echo "${{ steps.get-node-version.outputs.node-version }}" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Prerequisite | ||
|
||
This action assumes that the repository has already been checked out before | ||
calling the action, typically using `actions/checkout@v4`. If you have not | ||
checked out the code in a previous step, make sure to do so to avoid errors. | ||
|
||
This action does **not** perform a checkout action itself because it would be | ||
redundant. This action is part of the repository’s codebase, so if the code | ||
hasn’t already been checked out, the action itself wouldn't even be available to | ||
call. Additionally, rerunning a checkout at this stage could potentially | ||
overwrite any earlier `actions/checkout` step with different parameters, such as | ||
checking out a specific branch. | ||
|
||
## Example Usage | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: get-test-infos | ||
uses: ./.github/actions/get_test_infos | ||
with: | ||
node-version: '20.x' | ||
directories: './tests ./examples' | ||
exclude-dirs: 'tests/exclude_this_directory examples/exclude_this exclude_all_with_this_dir_in_path' | ||
|
||
- run: echo "${{ steps.get-test-infos.outputs.test-infos }}" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
> [!IMPORTANT] | ||
> This action performs a checkout using `actions/checkout@v4`, specifically | ||
> checking out the `github.event.pull_request.head.ref`. If your workflow | ||
> includes other checkout steps, be mindful that this checkout will override | ||
> previous checkouts, as it checks out a specific branch for the action to | ||
> function correctly. You should consider this when planning future steps in | ||
> your workflow, especially if those steps rely on a different commit or branch. | ||
## Example Usage | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: should-release | ||
uses: ./.github/actions/should_release | ||
|
||
- run: echo "${{ steps.should-release.outputs.should-release }}" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
LATEST_VERSION=$(npm view azle dist-tags.next) | ||
|
||
# Check if the version is in the format of "0.X.X-rc.Y" | ||
if [[ "$LATEST_VERSION" =~ ^([0-9]+\.[0-9]+\.[0-9]+)-rc\.([0-9]+)$ ]]; then | ||
VERSION_BASE="${BASH_REMATCH[1]}" # e.g., "0.24.2" | ||
RC_NUMBER="${BASH_REMATCH[2]}" # e.g., "17" | ||
|
||
# Increment the RC number | ||
NEXT_RC_NUMBER=$((RC_NUMBER + 1)) | ||
|
||
# Construct the next version | ||
VERSION="${VERSION_BASE}-rc.${NEXT_RC_NUMBER}" | ||
else | ||
# TODO when this case comes up write code for it accordingly. I just don't know what it looks like at this point | ||
echo "No matching rc version found, or version format incorrect." | ||
exit 1 | ||
fi | ||
|
||
|
||
BRANCH="release--$VERSION" | ||
|
||
git switch -c "$BRANCH" | ||
|
||
sed -E -i "s/(\"version\": \")(.*)(\")/\1$VERSION\3/" package.json | ||
sed -E -i "s/(\"version\": \")(.*)(\")/\1$VERSION\3/" dfx_extension/extension.json | ||
|
||
npm install | ||
|
||
git commit -am "$BRANCH" | ||
git push origin "$BRANCH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters