-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (52 loc) · 1.62 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This workflows will build, test and upload the package to npm when a release
# is created.
# To create a release, please follow the steps documented in the "Build &
# Publish" section of the README.md file.
name: Upload Package
on:
push:
tags:
- test[0-9]+.[0-9]+.[0-9]+
jobs:
test:
uses: ./.github/workflows/end-to-end-tests.yml
secrets: inherit
build:
runs-on: ubuntu-20.04
needs: test
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@readalongs"
- run: npm install
- run: |
npx nx build web-component
npx nx bundle web-component
npx nx build ngx-web-component
- run: |
# cd dist/packages/web-component && npm publish --access=public
cd dist/packages/web-component && npm pack
- run: |
# cd dist/packages/ngx-web-component && npm publish --access=public
cd dist/packages/ngx-web-component && npm pack
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: show CHANGELOG
env:
CHANGELOG: ${{ steps.changelog.outputs.changes }}
run: |
echo ${{ github.ref_name }}
echo "$CHANGELOG"
- name: show build and pack artifacts
run: |
find dist -type f -ls
ls -l packages/*/*.tgz