fix: wrong release action and name #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Process and Release Amnezia Split Tunnel JSON | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * 0' # Runs at midnight (00:00) every Sunday | |
workflow_dispatch: # Allows manual triggering from the GitHub interface | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true # Fetch submodules | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r NetblockTool/requirements.txt | |
- name: Run gather.sh | |
run: | | |
chmod +x ./gather.sh | |
./gather.sh | |
- name: Process CSV files | |
run: | | |
python convert_to_amnezia_format.py # Replace with your actual script name | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: amnezia_split_tunnel_hostnames | |
path: split_tunneling_amnezia.json | |
- name: Get current date and time | |
id: date | |
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: 'Release ${{ env.CURRENT_DATE }}' | |
artifacts: "./split_tunneling_amnezia.json" | |
makeLatest: true | |
replacesArtifacts: true | |
allowUpdates: true |