-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e7239c
commit eb5281a
Showing
9 changed files
with
1,863 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json", | ||
"changelog": "@changesets/changelog-git", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@alfergus0n/yeah": patch | ||
--- | ||
|
||
bumping patch version for this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Build, Test and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**/README.md' | ||
|
||
# ensures that only one workflow task per branch/environment will run at a time | ||
# avoids race conditions | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
versioning: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
# map step output to job output | ||
changes: ${{ steps.version.outputs.changes }} | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
# fetch all Git history, Changesets generates changelogs with correct commits | ||
fetch-depth: 0 | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
# cache remains for up to 7 days after last access | ||
- name: Building and Caching Packages | ||
uses: actions/cache@v3 | ||
id: cache-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install Dependencies If node_modules Cache Not Found | ||
if: steps.cache-modules.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Version Command | ||
id: version | ||
# sets steps.version.output.changes | ||
run: | | ||
echo ::set-output name=changes::$(npx changeset version 2>&1 | grep -q "No unreleased changesets found" && echo "false" || echo "true") | ||
# Push updated package.json and CHANGESET.md files | ||
- name: Push Changes | ||
if: steps.version.outputs.changes == 'true' | ||
run: | | ||
git config --global user.name "Automation" | ||
git add -A | ||
git commit -m "Updating Versioning For Packages" | ||
git push | ||
echo "::set-output name=changes::false" | ||
#git commit -m "Updating Versioning For Packages" 2>&1 >/dev/null || echo "No changes to commit" | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
# wait for versioning to complete successfully | ||
needs: versioning | ||
# This will only run if changeset files have been pushed | ||
if: needs.version.outputs.changes == 'false' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
registry-url: https://npm.pkg.github.com/ | ||
scope: '@alfergus0n' | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
#TODO: install/Build/Test/Package steps here | ||
|
||
- name: Release Packages | ||
uses: changesets/action@v1 | ||
with: | ||
setupGitUser: "Automation" | ||
publish: npm run changeset-publish | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Push tags | ||
run: git push --follow-tags | ||
|
||
# - name: Send Slack Notification If Successful | ||
# if: steps.changesets.outputs.published == 'true' | ||
# # You can do something when a publish happens. | ||
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!" | ||
# | ||
# - name: fals | ||
# if: steps.changesets.outputs.hasChangesets == 'false' | ||
# # You can do something when a publish should happen. | ||
# run: echo "no changesets" | ||
|
||
# - name: tru | ||
# if: steps.changesets.outputs.hasChangesets == 'true' | ||
# # You can do something when a publish should happen. | ||
# run: echo "has changesets" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.DS_Store | ||
node_modules | ||
*.log | ||
.turbo |
Oops, something went wrong.