Skip to content

Commit

Permalink
task(infra/cicd): develop branch publish tags on publish (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgluskin-starkware authored Jun 23, 2024
1 parent 0eba229 commit f9d510d
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 78 deletions.
5 changes: 0 additions & 5 deletions .changeset/cyan-ladybugs-glow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dirty-rockets-flash.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/famous-cougars-bathe.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/loud-ladybugs-hide.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/mighty-dancers-itch.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changeset/pre.json

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/rude-tigers-warn.md

This file was deleted.

22 changes: 14 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
name: PR
name: PR integration

on:
pull_request:
branches:
- develop
- master
- develop

jobs:
version:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/[email protected]

- uses: pnpm/action-setup@v4
with:
version: 8

- name: setup node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "pnpm"

- name: install dependencies
run: pnpm install
- name: run tests
run: pnpm test

- name: check formatting
run: pnpm format:check

- name: run tests
run: pnpm test
35 changes: 21 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release

on:
push:
branches:
Expand All @@ -11,45 +12,51 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/[email protected]

- uses: pnpm/action-setup@v4
with:
version: 8

- name: setup node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: "pnpm"

- name: Setup npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" >> .npmrc
- name: install dependencies
run: pnpm install

- name: run tests
run: pnpm test

- name: copy readme to every package
run: echo "./packages/core/ ./packages/ui/" | xargs -n 1 cp README.md

- name: Create Pre-release
if: github.ref == 'refs/heads/develop'
- name: Create Master Release
if: github.ref == 'refs/heads/master'
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: pre-release version bump"
title: "Pre-release version bump"
publish: pnpm run publish:next
commit: "chore: version bump"
title: "Master branch version bump"
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: github.ref == 'refs/heads/master'
- name: Create Develop Release
if: github.ref == 'refs/heads/develop'
uses: changesets/action@v1
with:
version: pnpm run version
commit: "chore: release version bump"
title: "Release version bump"
publish: pnpm run publish
commit: "chore: version bump"
title: "Develop branch version bump"
publish: pnpm run publish:next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"format": "prettier --ignore-path .gitignore --plugin-search-dir=. --write '**/*.{js,cjs,ts,tsx,svelte,md,yml,json}'",
"format:check": "prettier --ignore-path .gitignore --plugin-search-dir=. --check '**/*.{js,cjs,ts,tsx,svelte,md,yml,json}'",
"prepare": "pnpm run build && husky install",
"publish": "pnpm publish -r --no-git-checks",
"publish:next": "pnpm publish -r --no-git-checks --tag next",
"publish": "pnpm publish -r --no-git-checks && changeset tag",
"publish:next": "pnpm publish -r --no-git-checks --tag next && changeset tag",
"test": "CI=true pnpm run -r test",
"version": "changeset version && pnpm install --lockfile-only"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-starknet-core",
"version": "4.0.0-next.5",
"version": "4.0.0",
"keywords": [
"starknet",
"starkware",
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-starknet",
"version": "4.0.0-next.2",
"version": "4.0.0",
"keywords": [
"starknet",
"starkware",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"bowser": "^2.11.0",
"get-starknet-core": "workspace:^4.0.0-next.2"
"get-starknet-core": "workspace:^4.0.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9d510d

Please sign in to comment.