Skip to content

Commit

Permalink
feat(release): add automated release gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
wise-king-sullyman committed Nov 2, 2022
1 parent 90aeabb commit cbc1d87
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,38 @@ jobs:
if: steps.dist.outputs.cache-hit != 'true'
- name: PF4 Jest Tests
run: yarn test --maxWorkers=2
deploy:
runs-on: ubuntu-latest
needs: [lint, test_jest]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14'
- uses: actions/cache@v2
id: yarn-cache
name: Cache npm deps
with:
path: |
node_modules
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v2
id: dist
name: Cache dist
with:
path: |
packages/*/dist
packages/react-styles/css
key: ${{ runner.os }}-dist-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock', 'package.json', 'packages/*/*', '!packages/*/dist', '!packages/*/node_modules') }}
- name: Build dist
run: yarn build
if: steps.dist.outputs.cache-hit != 'true'
- name: Release to NPM
run: cd packages/module && npx semantic-release@19.0.5
6 changes: 6 additions & 0 deletions packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
"url": "https://github.com/wise-king-sullyman/patternfly-extension-seed/issues"
},
"homepage": "https://github.com/wise-king-sullyman/patternfly-extension-seed#readme",
"release": {
"branches": "main"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@patternfly/react-core": "^4.250.1"
},
Expand Down

0 comments on commit cbc1d87

Please sign in to comment.