Skip to content

Commit f266e4d

Browse files
authored
Merge pull request #855 from kategengler/kg-add-ci-releasing
2 parents cad713b + 90c0617 commit f266e4d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci-build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,37 @@ jobs:
8888
- name: test
8989
run: npx ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
9090
working-directory: ./test-app/
91+
92+
publish:
93+
name: Publish to npm
94+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Checkout
98+
uses: actions/checkout@v3
99+
100+
- name: Install node
101+
uses: volta-cli/action@v4
102+
with:
103+
node-version: 16.x
104+
registry-url: 'https://registry.npmjs.org'
105+
106+
- uses: actions/cache@v3
107+
id: npm-cache
108+
with:
109+
path: '**/node_modules'
110+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
111+
restore-keys: |
112+
${{ runner.os }}-npm-
113+
114+
- name: install dependencies
115+
if: steps.npm-cache.outputs.cache-hit != 'true'
116+
run: npm ci
117+
118+
- name: auto-dist-tag
119+
run: npx auto-dist-tag --write
120+
121+
- name: publish to npm
122+
run: npm publish
123+
env:
124+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}

0 commit comments

Comments
 (0)