Skip to content

Run and publish python program #468

Run and publish python program

Run and publish python program #468

Workflow file for this run

name: Run and publish python program
on:
schedule:
- cron: "0 2 * * *"
push:
branches: [ master ]
jobs:
run-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies and init ENV
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Run main.py
run: |
python main.py
echo $PWD
echo "FILE_PATH=$PWD" >> $GITHUB_ENV
- name: Generate Release
uses: ncipollo/release-action@v1
with:
name: ${{ env.DATE }} IP-for-continent
allowUpdates: true
tag: ${{ env.DATE }}-IP-for-continent
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ./CIDR-*
body: |
这是根据大洲分布IP的IP CIDR块list