Skip to content

Commit

Permalink
chore: Try authentificate with Github Actions & Lerna n°1
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Oct 16, 2024
1 parent 78750b6 commit 019f270
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
branches:
- master

env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

jobs:
build:
name: Build and publish
Expand All @@ -17,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
token: ${{ secrets.PAT_GITHUB }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -35,18 +32,14 @@ jobs:
- name: Check documentation
run: |
git diff --exit-code -- '*.md' || (echo "Docs are not up-to-date, please run yarn lint:md -f and repush" && exit 1)
- name: Git Identity
if: github.ref == 'refs/heads/master'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GH_TOKEN}@github.com/$GITHUB_REPOSITORY
- name: NPM Identity
- name: Publish to NPM
if: github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.PAT_GITHUB }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config user.name "Cozy Bot"
git config user.email "[email protected]"
git remote set-url origin https://cozy-bot:[email protected]/cozy/cozy-libs.git
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- name: Publish to NPM
if: github.ref == 'refs/heads/master'
run: yarn lerna publish --yes -m "[skip ci] Publish"
yarn lerna publish --yes -m "[skip ci] Publish"

0 comments on commit 019f270

Please sign in to comment.