Code: refresh code
This commit is contained in:
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -2,7 +2,7 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, dev ]
|
||||
branches: [ rm ]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@ -2,7 +2,7 @@ name: Publish Docker Image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- rm
|
||||
tags:
|
||||
- '*'
|
||||
jobs:
|
||||
|
31
.github/workflows/go.yml
vendored
31
.github/workflows/go.yml
vendored
@ -1,5 +1,5 @@
|
||||
name: Go
|
||||
on: [push, pull_request]
|
||||
on: [push]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
@ -30,12 +30,24 @@ jobs:
|
||||
staticcheck -- $(go list ./...)
|
||||
|
||||
- name: Build
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
#if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
NAME: clash
|
||||
BINDIR: bin
|
||||
run: make -j releases
|
||||
|
||||
- name: Prepare upload
|
||||
run: |
|
||||
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
|
||||
echo "FILE_SHA=$(git describe --tags --always 2>/dev/null)" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload files to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: clash_${{ env.FILE_SHA }}${{ env.FILE_DATE }}
|
||||
path: |
|
||||
bin/*
|
||||
|
||||
- name: Upload Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
@ -44,3 +56,18 @@ jobs:
|
||||
with:
|
||||
files: bin/*
|
||||
draft: true
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: GitRML/delete-workflow-runs@main
|
||||
with:
|
||||
retain_days: 1
|
||||
keep_minimum_runs: 2
|
||||
|
||||
- name: Remove old Releases
|
||||
uses: dev-drprasad/delete-older-releases@v0.2.0
|
||||
if: startsWith(github.ref, 'refs/tags/') && !cancelled()
|
||||
with:
|
||||
keep_latest: 1
|
||||
delete_tags: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
6
.github/workflows/stale.yml
vendored
6
.github/workflows/stale.yml
vendored
@ -2,8 +2,10 @@
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 1 * * *"
|
||||
branches:
|
||||
- rm
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
Reference in New Issue
Block a user