Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
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
62 changes: 2 additions & 60 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,8 @@ on:
branches:
- master

env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

jobs:

prepare-env:
runs-on: ubuntu-latest
outputs:
GITHUB_HEAD_REF: ${{ steps.script.outputs.headRef }}
GITHUB_BASE_REF: ${{ steps.script.outputs.tagHash }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache node modules
id: cache
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('package-lock.json') }}

- name: npm install
if: steps.cache.outputs.cache-hit != 'true'
run: npm install

- name: Set correct env vars
id: script
uses: ./tools/actions/set-master-vars

release:
needs: [ prepare-env ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -55,7 +23,7 @@ jobs:

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
run: npm i

- name: GIT config
run: |
Expand All @@ -75,30 +43,4 @@ jobs:
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npx nx run-many -t publish --all --base origin/master
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

changelog-task:
runs-on: ubuntu-latest
needs:
- release
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache node modules
uses: actions/cache@v2
with:
path: |
**/node_modules
key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('package-lock.json') }}

- name: GIT config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- name: nx workspace:version
run: npx nx run workspace:version --prod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
},
"version": {
"executor": "@jscutlery/semver:version",
"options": {}
"options": {
"syncVersions": true
}
},
"prepare": {
"dependsOn": ["^prepare"]
Expand Down
Loading
Loading