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

feat: integrate changeset #71

Merged
merged 2 commits into from
Feb 20, 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)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "motss/lit-ntml"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "rc",
"initialVersions": {
"lit-ntml": "4.0.1"
},
"changesets": []
}
5 changes: 5 additions & 0 deletions .changeset/thin-donuts-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"lit-ntml": patch
---

feat: integrate changeset
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- '**'
paths-ignore:
- '**/*.md'
push: # run ci workflow so thats status badges can always point to main branch.
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
Expand All @@ -23,7 +26,7 @@ env:

jobs:
lint:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'docs:') && !contains(github.event.head_commit.message, 'chore(release)')"
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'chore(release)')"
env:
IS_UBUNTU: ${{ contains(matrix.os, 'ubuntu') }}
name: lint - ${{ matrix.os }} ${{ matrix.target }}
Expand Down Expand Up @@ -62,6 +65,15 @@ jobs:
restore-keys: |
${{ matrix.os }}-node-${{ env.NODE_VERSION }}-npm-${{ env.NPM_VERSION }}

- name: Debugging
run: |
echo "Debugging `github` payload:"

echo "::group::$JSON"
echo "::endgroup::"
env:
JSON: ${{ toJSON(github) }}

- name: Install dependencies
run: |
npm pkg delete scripts.postinstall
Expand Down
42 changes: 11 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ name: publish

on:
push:
tags:
- 'v**'
branches:
- main

defaults:
run:
shell: bash

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_VERSION: v0.0.0
NPM_CACHE_DIR: ~/.npm
Expand Down Expand Up @@ -76,32 +77,11 @@ jobs:
run: |
npm pkg delete devDependencies nano-staged scripts

- name: Publish to npm (Prerelease)
if: contains(github.ref, '-rc') == true || contains(github.ref, '-') == true
run: |
npm publish . --tag=next

- name: Publish to npm
if: contains(github.ref, '-rc') == false && contains(github.ref, '-') == false
run: |
npm publish .

# See https://github.com/actions/setup-node/issues/73.
# - name: Setup node@${{ matrix.target }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.target }}
# registry-url: 'https://npm.pkg.github.com/'
# scope: '@motss'

# - name: Publish to GPR (Prerelease)
# if: success() && contains(github.ref, '-') == true
# run: |
# npm config list
# npm publish . --tag=next

# - name: Publish to GPR (Prerelease)
# if: success() && contains(github.ref, '-') == false
# run: |
# npm config list
# npm publish .
- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: 'chore: release package'
publish: npm x -y -- changeset publish
title: 'chore: release package'
version: npm x -y -- changeset version
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The MIT License (MIT)
Copyright © 2019 Rong Sen Ng <[email protected]>
Copyright © 2023 Rong Sen Ng <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Loading