mirror of
https://github.com/MetaCubeX/meta-rules-dat.git
synced 2026-05-20 22:17:14 +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:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Set variables
|
||||
run: |
|
||||
@@ -26,10 +28,8 @@ jobs:
|
||||
echo "WIN_EXTRA=https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/extra.txt" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Checkout
|
||||
- name: Checkout the current repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: MetaCubeX/meta-rules-dat
|
||||
|
||||
- name: Checkout Loyalsoldier/domain-list-custom
|
||||
uses: actions/checkout@v4
|
||||
@@ -310,23 +310,12 @@ jobs:
|
||||
sha256sum geoip-lite.metadb > geoip-lite.metadb.sha256sum
|
||||
sha256sum GeoLite2-ASN.mmdb > GeoLite2-ASN.mmdb.sha256sum
|
||||
|
||||
- name: Delete current release assets
|
||||
uses: andreaswilli/delete-release-assets-action@v3.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: latest
|
||||
deleteOnlyFromDrafts: false
|
||||
|
||||
- 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: Delete release if exist then create release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release delete latest --cleanup-tag -y || true
|
||||
gh release create latest --title "Release ${{ env.BUILDTIME }}" ./publish/*
|
||||
|
||||
- name: Git push assets to "release" branch
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user