Skip to content

Commit

Permalink
ncu, setup auto, add gh workflow, set up for npm repo release as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rosskevin committed Jan 22, 2025
1 parent f0547e1 commit a017753
Show file tree
Hide file tree
Showing 8 changed files with 4,513 additions and 898 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on: [push]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3

- name: Prepare repository
run: git fetch --unshallow --tags

- uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'yarn'

# allow the lock file to change (updating our own workspace versions in monorepo)
# - run: yarn install --no-immutable
# - run: yarn build
# - run: yarn test

# commit back the lock file change if it works
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply yarn.lock changes

# publishes canaries and releases to github
- run: yarn release

# cannot run this on branches because it doesn't keep the canary version from auto shipit, can only secondarily publish to npm for main branch
- name: Publish secondarily to npm
run: npm publish --access=public --ignore-scripts --@alienfast:registry='https://registry.npmjs.org'
if: github.ref == 'refs/heads/main'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ tsconfig.tsbuildinfo
!.yarn/patches
!.yarn/releases

node_modules
node_modules
.env
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# provide this for the github actions
@alienfast:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.1.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ npmScopes:
npmAlwaysAuth: true
npmRegistryServer: "https://npm.pkg.github.com"

yarnPath: .yarn/releases/yarn-4.3.1.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@alienfast/prettier-config",
"description": "AlienFast's prettier config.",
"packageManager": "yarn@4.3.1",
"packageManager": "yarn@4.6.0",
"version": "1.0.0",
"license": "MIT",
"repository": "https://github.com/alienfast/prettier-config",
Expand All @@ -10,12 +10,29 @@
},
"type": "module",
"main": "index.json",
"scripts": {
"release": "yarn auto shipit"
},
"keywords": [
"prettier",
"prettier-config"
],
"peerDependencies": {
"prettier": "*"
},
"author": "Kevin Ross <[email protected]>"
"author": "Kevin Ross <[email protected]>",
"devDependencies": {
"@auto-it/all-contributors": "^11.3.0",
"@auto-it/first-time-contributor": "^11.3.0",
"@auto-it/released": "^11.3.0",
"auto": "^11.3.0"
},
"auto": {
"plugins": [
"npm",
"all-contributors",
"first-time-contributor",
"released"
]
}
}
Loading

0 comments on commit a017753

Please sign in to comment.