42 lines (34 loc) · 1.08 KB
/
deno.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
name: Deno Deploy
on:
push:
branches:
- '*'
jobs:
BuildDeno:
name: Publish Deno Types
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, 'release')"
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install Dependencies
run: npm ci
- name: Get GitHub Branch Name
run: echo "GITHUB_BRANCH_NAME=$(echo ${{ github.ref }} | cut -c12-)" >> $GITHUB_ENV
- name: Push new code
run: |
# Build files
npm run build:deno
echo -e "\n# Commit and push"
git add --all .
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "build: deno build for ${GITHUB_SHA}" || true
git push origin $TARGET_BRANCH
env:
TARGET_BRANCH: '${{ env.GITHUB_BRANCH_NAME }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'