2024-10-07 01:30:54 +00:00
|
|
|
name: Build and Release Proxy.pac
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-10-07 03:07:53 +00:00
|
|
|
- "master"
|
2024-10-08 02:56:29 +00:00
|
|
|
paths:
|
|
|
|
- '**/*.example'
|
|
|
|
- '**/*.js'
|
|
|
|
- '**/*.sh'
|
2024-10-07 01:30:54 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
2024-10-07 03:57:35 +00:00
|
|
|
|
|
|
|
permissions: write-all
|
2024-10-07 01:30:54 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
|
|
|
|
- name: Run build script
|
|
|
|
run: |
|
|
|
|
chmod +x ./build.sh
|
|
|
|
./build.sh
|
|
|
|
|
2024-10-07 03:17:15 +00:00
|
|
|
- name: Create release
|
2024-10-07 01:30:54 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-10-07 03:17:15 +00:00
|
|
|
sha: ${{ github.sha }}
|
|
|
|
run: |
|
2024-10-08 02:56:29 +00:00
|
|
|
gh release create "$(date '+%Y-%m-%d-')${sha:0:7}" --generate-notes ./proxy.pac
|