Skip to content

Commit bf93c76

Browse files
🔄 Synced file(s) with BetaHuhn/github-files (BetaHuhn#24)
* 🔄 Synced local '.github/workflows/release.yml' with remote 'workflows/versioning/release.yml' * 🔄 Created local '.github/workflows/node.yml' from remote 'workflows/node/node.yml' * 🔄 Created local '.github/workflows/latest-tag.yml' from remote 'workflows/versioning/latest-tag.yml' Co-authored-by: BetaHuhn <schiller@mxis.ch>
1 parent a53f84e commit bf93c76

File tree

5 files changed

+80
-53
lines changed

5 files changed

+80
-53
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,31 @@ on:
55
workflow_dispatch:
66
jobs:
77
build:
8-
name: Build files
9-
runs-on: ubuntu-18.04
8+
name: Build and Commit
9+
runs-on: ubuntu-latest
1010
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2.3.4
14-
with:
15-
ref: ${{ github.head_ref }}
16-
token: ${{ secrets.GH_PAT }}
13+
uses: actions/checkout@v2
1714
- name: Setup Node.js
18-
uses: actions/setup-node@v2.1.4
15+
uses: actions/setup-node@v2
1916
with:
2017
node-version: 14
2118
- name: Cache node modules
22-
uses: actions/cache@v2
23-
env:
24-
cache-name: cache-node-modules
25-
with:
26-
path: ~/.npm
27-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28-
restore-keys: |
29-
${{ runner.os }}-build-${{ env.cache-name }}-
30-
${{ runner.os }}-build-
31-
${{ runner.os }}-
19+
uses: c-hive/gha-npm-cache@v1
3220
- name: Install dependencies
3321
run: npm ci
34-
- name: Build TypeScript
22+
- name: Run build command
3523
run: npm run build
3624
- name: Commit build
37-
uses: stefanzweifel/git-auto-commit-action@v4.9.2
25+
uses: stefanzweifel/git-auto-commit-action@v4.8.0
3826
with:
3927
commit_message: ":rocket: Deploy new version [skip ci]"
4028
commit_user_name: BetaHuhn Bot
4129
commit_user_email: bot@mxis.ch
4230
commit_author: BetaHuhn Bot <bot@mxis.ch>
4331
upload:
44-
needs: build
32+
needs: [build]
4533
name: Upload to CDN
4634
runs-on: ubuntu-latest
4735
steps:

.github/workflows/latest-tag.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Tag CI
2+
on:
3+
release:
4+
types: [published, edited]
5+
jobs:
6+
latest:
7+
name: Latest
8+
runs-on: windows-latest
9+
steps:
10+
- name: Update latest tag
11+
uses: Actions-R-Us/actions-tagger@latest
12+
env:
13+
GITHUB_TOKEN: "${{ secrets.GH_PAT }}"
14+
with:
15+
publish_latest_tag: true

.github/workflows/lint.yml renamed to .github/workflows/node.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint CI
1+
name: Node CI
22
on:
33
push:
44
branches-ignore:
@@ -23,4 +23,21 @@ jobs:
2323
- name: Install dependencies
2424
run: npm ci
2525
- name: Run lint command
26-
run: npm run lint
26+
run: npm run lint
27+
build:
28+
name: Build
29+
runs-on: ubuntu-latest
30+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Setup Node.js
35+
uses: actions/setup-node@v2
36+
with:
37+
node-version: 14
38+
- name: Cache node modules
39+
uses: c-hive/gha-npm-cache@v1
40+
- name: Install dependencies
41+
run: npm ci
42+
- name: Run build command
43+
run: npm run build

.github/workflows/release.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
branches:
55
- master
66
jobs:
7-
release:
8-
name: Build, lint and release
9-
runs-on: ubuntu-18.04
7+
lint:
8+
name: Lint
9+
runs-on: ubuntu-latest
1010
if: "!contains(github.event.head_commit.message, '[skip ci]')"
1111
steps:
1212
- name: Checkout
@@ -19,11 +19,42 @@ jobs:
1919
uses: c-hive/gha-npm-cache@v1
2020
- name: Install dependencies
2121
run: npm ci
22-
- name: Build TypeScript
23-
run: npm run build
24-
- name: Run linter
22+
- name: Run lint command
2523
run: npm run lint
26-
- name: Release
24+
build:
25+
name: Build
26+
runs-on: ubuntu-latest
27+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v2
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v2
33+
with:
34+
node-version: 14
35+
- name: Cache node modules
36+
uses: c-hive/gha-npm-cache@v1
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Run build command
40+
run: npm run build
41+
release:
42+
needs: [lint, build]
43+
name: Release
44+
runs-on: ubuntu-latest
45+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v2
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v2
51+
with:
52+
node-version: 14
53+
- name: Cache node modules
54+
uses: c-hive/gha-npm-cache@v1
55+
- name: Install dependencies
56+
run: npm ci
57+
- name: Run Semantic Release
2758
run: npx semantic-release
2859
env:
2960
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

.github/workflows/test.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)