-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 1.85 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
56
57
58
59
60
61
62
63
64
name: Release Package
on:
push:
branches:
- 'main'
paths-ignore:
- 'README.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
jobs:
create_release:
uses: fullstack-devops/git-workflows/.github/workflows/create-release.yml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
needs: create_release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node for npmjs
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
scope: '@fullstack-devops'
- name: install packages
run: yarn
- name: build applikation
run: yarn run build
- name: yarn publish to npmjs
working-directory: dist/ng-mat-components
run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}
- name: Setup node for GitHub
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
- name: yarn publish to GitHub
working-directory: dist/ng-mat-components
run: yarn publish --access public --new-version ${{ needs.create_release.outputs.version }} --no-git-tag-version
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_release:
runs-on: ubuntu-latest
needs: [build, create_release]
steps:
- name: Setup awesome-ci
uses: fullstack-devops/awesome-ci-action@main
- name: Publish release
run: awesome-ci release publish --release-id ${{ needs.create_release.outputs.release-id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}