This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 149
56 lines (52 loc) · 1.46 KB
/
deploy.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
name: Deploy
on:
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: 🚀 Deploy
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
github_token: ${{ secrets.PAT }}
name: build-artifact
path: dist
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Set correct path
run: sed -i "s/\/dist//g" package.json
- name: Copy files
run: |
cp README.md dist
cp LICENSE dist
cp package.json dist
cp .npmignore dist
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT }}
GIT_AUTHOR_NAME: 'GitHub Actions'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: 'GitHub Actions'
GIT_COMMITTER_EMAIL: '[email protected]'