Skip to content

Commit

Permalink
Merge pull request #490 from bandada-infra/chore/automatic-releases
Browse files Browse the repository at this point in the history
Update release workflow to publish packages automatically
  • Loading branch information
vplasencia authored Apr 23, 2024
2 parents 391667e + 3159424 commit 51a32fb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
on:
push:
tags:
- "v*"
- "*"

jobs:
release:
Expand All @@ -24,9 +24,20 @@ jobs:
cache: yarn
registry-url: "https://registry.npmjs.org"

- name: Authentication
run: |
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn

- name: Publish packages
run: yarn version:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: yarn version:release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,3 +325,31 @@ yarn commit
```

The command will automatically verify that the modified files adhere to the rules of ESLint and Prettier.

### Releases

Steps:

1. Bump a new version with:

```bash
yarn version:bump <version>
# e.g. yarn version:bump 2.0.0
```

This step creates a commit and a git tag.

2. Push the changes to main:

```bash
git push origin main
```

3. Push the new git tag:

```bash
git push origin <version>
# e.g. git push origin 2.0.0
```

After pushing the new git tag, a workflow will be triggered and will publish the Bandada packages on [npm](https://www.npmjs.com/) and release a new version on Github with its changelogs automatically.

0 comments on commit 51a32fb

Please sign in to comment.