Skip to content

Commit

Permalink
Merge pull request #5 from brainylab/beta
Browse files Browse the repository at this point in the history
auto-sync beta to main
  • Loading branch information
andrefelipeschulle authored Oct 9, 2024
2 parents 3712b0e + fdc06b8 commit 3100e1a
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "@brainylab/resolver-validator" }
{ "repo": "brainylab/resolver-validators" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "beta",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
Expand Down
5 changes: 0 additions & 5 deletions .changeset/rare-beans-count.md

This file was deleted.

54 changes: 41 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
release-npm:
name: Release to NPM
runs-on: ubuntu-latest
steps:
- name: checkout branch
uses: actions/checkout@v4

- name: Git fetch tags
run: git fetch --tags origin

- name: install and configure git
uses: ./.github/common-actions/install

Expand All @@ -25,6 +28,11 @@ jobs:
# - name: Tests
# run: pnpm test

- name: npm package registry authentication
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: create release pull request or publish to NPM
id: changesets
uses: changesets/action@v1
Expand All @@ -34,9 +42,38 @@ jobs:
commit: 'ci(changesets): version packages'
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: sync files from beta to main branch if a publish happens
if: steps.changesets.outputs.published == 'true'
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/brainylab/resolver-validators/dispatches \
-d '{"event_type":"sync-beta-to-main"}'
release-grp:
name: Release to GRP
runs-on: ubuntu-latest
needs: release-npm
steps:
- name: checkout branch
uses: actions/checkout@v4

- name: Git fetch tags
run: git fetch --tags origin

- name: install and configure git
uses: ./.github/common-actions/install

- name: build packages
run: pnpm build

# - name: Tests
# run: pnpm test

- name: get package registry GRP
run: npm config set registry https://npm.pkg.github.com
Expand All @@ -57,12 +94,3 @@ jobs:
NPM_TOKEN: ${{ secrets.GHP_PACKAGES_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHP_PACKAGES_TOKEN: ${{ secrets.GHP_PACKAGES_TOKEN }}

- name: sync files from beta to main branch if a publish happens
if: steps.changesets.outputs.published == 'true'
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/brainylab/resolver-validators/dispatches \
-d '{"event_type":"sync-beta-to-main"}'
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
save-exact=true
save-exact=true
enable-pre-post-scripts=true
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# @brainylab/resolver-validators

## 0.0.3

### Patch Changes

- [`be0977d`](https://github.com/brainylab/resolver-validators/commit/be0977d54e0a6c1f96a6210edd73dd0f012ff780) Thanks [@andrefelipeschulle](https://github.com/andrefelipeschulle)! - update version

## 0.0.2

### Patch Changes

- [`bf58f2e`](https://github.com/brainylab/resolver-validators/commit/bf58f2e64f9c23d3211e4776836ee10d36707ac1) Thanks [@andrefelipeschulle](https://github.com/andrefelipeschulle)! - add support to params on string and numbers
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@brainylab/resolver-validators",
"version": "0.0.1",
"version": "0.0.3",
"description": "",
"keywords": [],
"bugs": {
Expand Down Expand Up @@ -32,6 +32,8 @@
"commit:add": "git add .",
"commit:detail": "cz",
"commit:push": "git push",
"prepack": "clean-package",
"postpack": "clean-package restore",
"release": "changeset publish",
"release:beta": "changeset publish --snapshot --no-git-tag --tag beta",
"version": "changeset version",
Expand Down

0 comments on commit 3100e1a

Please sign in to comment.