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: use changesets for versioning and publishing #2182

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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)
18 changes: 18 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "lingui/js-lingui" }],
"commit": false,
"fixed": [["@lingui/*"]],
"linked": [],
"ignore": [
"*",
"@lingui/remote-loader"
],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true,
"updateInternalDependents": "always"
}
}
Comment on lines +1 to +18
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be "private: false" to not public private packages (jest-mocks for example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no such option in the configuration (schema.json), changesets should ignore private packages by default

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

66 changes: 0 additions & 66 deletions .github/workflows/release.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/version-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Version (next)

on:
push:
branches:
- next

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
scope: '@lingui'

- name: Install dependencies
run: yarn

- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: yarn version:next
publish: yarn release:build && yarn release:next
createGithubReleases: false
branch: next
commit: "chore(release): bump next version [skip ci]"
title: "chore(release): bump next version"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Version (latest)

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
scope: '@lingui'

- name: Install dependencies
run: yarn

- name: Create Release Pull Request
uses: changesets/action@v1
with:
version: yarn version:latest
publish: yarn release:build && yarn release:latest
createGithubReleases: true
commit: "chore(release): bump version [skip ci]"
title: "chore(release): bump version"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading
Loading