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

Fix: Actions github #1606

Merged
merged 8 commits into from
Oct 24, 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
30 changes: 20 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ on:
pull_request:
branches:
- master
# - development

jobs:
build-and-publish:
name: Build Jopi & Publish New Version in NPM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@master
- name: reattach HEAD to Head Ref
run: git checkout "$(echo ${{ github.head_ref }} | sed -E 's|refs/[a-zA-Z]+/||')"
if: github.head_ref != ''
- name: reattach HEAD to Ref
run: git checkout "$(echo ${{ github.ref }} | sed -E 's|refs/[a-zA-Z]+/||')"
if: github.head_ref == ''

# - name: Checkout
# uses: actions/checkout@v3
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

#- name: Configure git credentials
# uses: OleksiyRudenko/gha-git-credentials@v2-latest
Expand All @@ -29,10 +38,10 @@ jobs:
run: |
yarn install

- name: Set Current Version
run: |
CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV
# - name: Set Current Version
# run: |
# CURRENT_VERSION=$(node -p 'require("./lerna.json").version')
# echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV

- name: Run tests
run: yarn test
Expand All @@ -54,7 +63,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd node_modules/.bin
lerna version patch --yes
yarn lerna publish --yes --registry https://registry.npmjs.org/:_authToken=${NPM_TOKEN}
# lerna version patch --yes

- name: Publish New Jopi version to NPM
env:
Expand Down
5 changes: 2 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "independent",
"private": true,
"version": "6.6.2",
"command.publish.verifyAccess": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"jest-haste-map": "^29.6.4",
"jest-resolve": "^29.6.4",
"jest-styled-components": "^7.1.1",
"lerna": "^6.6.2",
"lerna": "6.6.2",
"lint-staged": "^12.3.8",
"postcss": "^8.4.12",
"postcss-syntax": "^0.36.2",
Expand Down