-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #170 from hatemhosny/releases/v0.1.2
Prepare release v0.1.2
- Loading branch information
Showing
109 changed files
with
6,679 additions
and
7,340 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 |
---|---|---|
|
@@ -8,3 +8,6 @@ vendor_modules | |
**/*.json | ||
scripts | ||
python | ||
website/.docusaurus | ||
website/docs/api | ||
website/static |
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) | ||
- **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) | ||
|
||
- **What is the current behavior?** (You can also link to an open issue here) | ||
|
||
- **What is the new behavior (if this is a feature change)?** | ||
|
||
* **What is the current behavior?** (You can also link to an open issue here) | ||
- **Issue related to this PR** | ||
<!-- | ||
please make sure that these changes have been discussed and approved in an issue. | ||
Otherwise, please do: https://github.com/hatemhosny/racing-bars/issues/new | ||
--> | ||
|
||
[ ] The changes have been discussed in an issue and the approach has been approved. | ||
|
||
issue: | ||
|
||
* **What is the new behavior (if this is a feature change)?** | ||
|
||
|
||
|
||
* **Other information**: | ||
- **Other information**: |
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 @@ | ||
name: Release PR | ||
|
||
# on creating a release branch (releases/**) create a PR to main | ||
|
||
on: create | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: contains(github.ref, 'refs/heads/releases/') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_ACTIONS_REPO_PAT }} | ||
|
||
- name: Get version | ||
id: vars | ||
run: echo ::set-output name=version::$(echo ${{github.ref_name}} | sed 's/^releases\///') | ||
|
||
- name: Create pull request to main | ||
run: gh pr create --title "Prepare release ${{steps.vars.outputs.version}}" --body "Prepare release ${{steps.vars.outputs.version}}" --base main --head "${{github.ref_name}}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_PAT }} |
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,83 @@ | ||
name: Release | ||
|
||
# on merging a release branch (releases/**) to main: | ||
# - create a GitHub release (with release notes and attached files) | ||
# - create a tag | ||
# - publish to npm | ||
# - create a pull request to develop to incorporate back the changes | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged && startsWith(github.head_ref, 'releases/') | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GH_ACTIONS_REPO_PAT }} | ||
|
||
- name: Get version | ||
id: vars | ||
run: echo ::set-output name=version::$(echo ${{github.head_ref}} | sed 's/^releases\///') | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
- name: Release notes | ||
run: node ./scripts/release-notes.js | ||
|
||
- name: Create tag | ||
run: git tag ${{steps.vars.outputs.version}} && git push origin --tags | ||
|
||
- name: Compress build directory (tar) | ||
run: tar -czf racing-bars-${{steps.vars.outputs.version}}.tar.gz build | ||
|
||
- name: Compress build directory (zip) | ||
uses: vimtor/action-zip@v1 | ||
with: | ||
files: build/ | ||
dest: racing-bars-${{steps.vars.outputs.version}}.zip | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: ${{steps.vars.outputs.version}} | ||
tag_name: ${{steps.vars.outputs.version}} | ||
body_path: CHANGELOG.tmp.md | ||
files: | | ||
racing-bars-${{steps.vars.outputs.version}}.tar.gz | ||
racing-bars-${{steps.vars.outputs.version}}.zip | ||
token: ${{ secrets.GH_ACTIONS_REPO_PAT }} | ||
|
||
- name: Publish to NPM | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | ||
npm publish --access=public | ||
working-directory: ./build | ||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
- name: Create a pull request to develop | ||
if: startsWith(github.head_ref, 'releases/v') | ||
run: gh pr create --title "release ${{steps.vars.outputs.version}}" --body "https://www.npmjs.com/package/racing-bars" --base develop --head main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_REPO_PAT }} |
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,39 @@ | ||
build/ | ||
|
||
*.js | ||
*.jsx | ||
|
||
*.ts | ||
*.tsx | ||
*.mjs | ||
|
||
*.json | ||
|
||
*.html | ||
*.txt | ||
*.md | ||
|
||
*.svg | ||
*.png | ||
*.jpg | ||
*.gif | ||
*.mp4 | ||
|
||
*.toml | ||
*.csv | ||
*.xml | ||
*.ico | ||
*.pptx | ||
*.xcf | ||
|
||
*.py | ||
|
||
*.js.map | ||
*.lock | ||
|
||
*.yml | ||
*.yaml | ||
|
||
website/static/lib/ | ||
LICENSE | ||
PKG-INFO |
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
Oops, something went wrong.