Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: configure release process using changesets #10

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "origin/master",
"updateInternalDependencies": "patch",
"ignore": ["components-library", "components-library-angular"]
}
6 changes: 6 additions & 0 deletions .changeset/lovely-radios-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@web-component-wrapper/angular': minor
'@web-component-wrapper/core': minor
---

Initial release
31 changes: 18 additions & 13 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: read
actions: read
statuses: read
pull-requests: read
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -28,13 +25,21 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
# - name: Derive appropriate SHAs for base and head for `nx affected` commands
# uses: nrwl/nx-set-shas@v4
- name: lint
run: npx nx affected:lint --base=origin/master~1
run: npm run lint # lint all
- name: build
run: npx nx affected:build --base=origin/master~1
run: npm run build # build all
- name: test
run: npx nx affected:test --base=origin/master~1
# @todo - add release step
# npm run affected:release
run: npm run test # test all
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: npm run release
version: npm run version
commit: "chore: new release"
title: "chore: new release candidate"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
- name: lint
run: npx nx affected:lint --base=origin/master
run: npm run affected:lint
- name: build
run: npx nx affected:build --base=origin/master
run: npm run affected:build
- name: test
run: npx nx affected:test --base=origin/master
run: npm run affected:test
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"version": "17.0.3"
},
"affected": {
"defaultBase": "master"
"defaultBase": "origin/master"
}
}
Loading
Loading