-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.64 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
name: Publish Package to npm.pkg.github
on:
repository_dispatch:
types: [semantic-release] # curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/[org-name-or-username]/[repository]/dispatches -d '{ "event_type": "semantic-release" }'
push:
branches:
- main
permissions: write-all
jobs:
deploy:
name: Release
strategy:
matrix:
node: ['20.8.1']
os: ['self-hosted']
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
runs-on: ${{ matrix.os }}
container:
image: ubuntu:latest
steps:
- name: OS - Update
run: apt-get update -y
- name: OS - Installing packages
run: apt-get install tzdata
- name: OS - Installing Git CLI
run: apt-get install git-all -y
- name: Node.js Setup
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://npm.pkg.github.com'
scope: '@aziontech'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_SECRET }} # necessary to use npm install to internal git repository
- name: Release
shell: bash
run: |
rm -rf ./*
git clone https://github.com/aziontech/azion-theme.git && cd ./azion-theme && npm install
npx semantic-release
env:
GH_TOKEN: ${{ secrets.GIT_PKG }}
GITHUB_TOKEN: ${{ secrets.GIT_PKG }}
NPM_TOKEN: ${{ secrets.GIT_PKG }}
NODE_AUTH_TOKEN: ${{ secrets.GIT_PKG }}