proxy.pac.test/.github/workflows/build-and-release.yml

39 lines
750 B
YAML

name: Build and Release Proxy.pac
on:
push:
branches:
- "master"
paths:
- '**/*.example'
- '**/*.js'
- '**/*.sh'
schedule:
- cron: "0 0 * * 0"
permissions: write-all
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
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.sha }}
run: |
gh release create "$(date '+%Y-%m-%d-')${sha:0:7}" --generate-notes ./proxy.pac