Skip to content

Commit 8a40821

Browse files
authored
Create main.yml
1 parent 8822209 commit 8a40821

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# Allows it to be ran manually
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
name: Publish Userscripts
14+
runs-on: ubuntu-latest
15+
16+
env:
17+
YARN_ENABLE_MIRROR: 'false'
18+
YARN_ENABLE_GLOBAL_CACHE: 'false'
19+
20+
steps:
21+
# Setup file access & Cache
22+
- uses: actions/checkout@v2
23+
- uses: actions/cache@v2
24+
with:
25+
path: |
26+
.yarn/cache
27+
key: |
28+
yarn2-${{ hashFiles('yarn.lock') }}
29+
restore-keys: |
30+
yarn2-${{ hashFiles('yarn.lock') }}
31+
32+
# Building with yarn
33+
- uses: borales/actions-yarn@v2.3.0
34+
with:
35+
cmd: install
36+
- uses: borales/actions-yarn@v2.3.0
37+
with:
38+
cmd: build
39+
40+
# Pushing to release
41+
- name: Release
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: dist/*.user.js

0 commit comments

Comments
 (0)