-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (51 loc) · 1.41 KB
/
autorelease.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
name: publish package
on:
push:
branches:
- main
schedule: # midnight nightly
- cron: '0 0 * * *'
workflow_dispatch: {} # allow manual triggering
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Refresh PSL
run: | # get the latest public suffix list and write to file
make refresh-psl-curl
shell: bash
- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Add deployment key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_KEY_PRIVKEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
shell: bash
- name: Commit and push
run: |
if git diff --quiet; then
echo "No changes to commit"
else
git add .
git commit -m "Update PSL"
git push
fi
shell: bash
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 0.1.${{ steps.date.outputs.date }}
release_name: Release 0.1.${{ steps.date.outputs.date }}
draft: false
prerelease: false