mirror of
https://github.com/MetaCubeX/meta-rules-dat.git
synced 2026-08-05 03:34:54 +08:00
Merge pull request #153 from Goooler/improve-release-workflow
Improve the release workflow for GH release
This commit is contained in:
29
.github/workflows/run.yml
vendored
29
.github/workflows/run.yml
vendored
@@ -11,6 +11,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Set variables
|
- name: Set variables
|
||||||
run: |
|
run: |
|
||||||
@@ -26,10 +28,8 @@ jobs:
|
|||||||
echo "WIN_EXTRA=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt" >> $GITHUB_ENV
|
echo "WIN_EXTRA=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout the current repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
repository: MetaCubeX/meta-rules-dat
|
|
||||||
|
|
||||||
- name: Checkout Loyalsoldier/domain-list-custom
|
- name: Checkout Loyalsoldier/domain-list-custom
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -310,23 +310,12 @@ jobs:
|
|||||||
sha256sum geoip-lite.metadb > geoip-lite.metadb.sha256sum
|
sha256sum geoip-lite.metadb > geoip-lite.metadb.sha256sum
|
||||||
sha256sum GeoLite2-ASN.mmdb > GeoLite2-ASN.mmdb.sha256sum
|
sha256sum GeoLite2-ASN.mmdb > GeoLite2-ASN.mmdb.sha256sum
|
||||||
|
|
||||||
- name: Delete current release assets
|
- name: Delete release if exist then create release
|
||||||
uses: andreaswilli/delete-release-assets-action@v3.0.0
|
env:
|
||||||
with:
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
run: |
|
||||||
tag: latest
|
gh release delete latest --cleanup-tag -y || true
|
||||||
deleteOnlyFromDrafts: false
|
gh release create latest --title "Release ${{ env.BUILDTIME }}" ./publish/*
|
||||||
|
|
||||||
- name: Create and Upload Release
|
|
||||||
id: upload_release
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
release_name: Release ${{ env.BUILDTIME }}
|
|
||||||
tag: latest
|
|
||||||
file_glob: true
|
|
||||||
overwrite: true
|
|
||||||
file: ./publish/*
|
|
||||||
|
|
||||||
- name: Git push assets to "release" branch
|
- name: Git push assets to "release" branch
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user