add auto release

This commit is contained in:
zhangyibo.114514
2024-09-29 17:45:11 +08:00
parent ba166436c0
commit d8810046b2
2 changed files with 51 additions and 3 deletions

View File

@@ -1,9 +1,7 @@
name: Create Binary Pkg
on:
push:
branches:
- main
workflow_call:
jobs:
build_14:
@@ -23,6 +21,7 @@ jobs:
run: |
git config --global --add safe.directory /home/runner/work/photoprism-freebsd-port/photoprism-freebsd-port
make package
for file in work/pkg/*.pkg;do mv $file ${file//\.pkg/-FreeBSD-$(uname -r).pkg}; done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
@@ -47,6 +46,7 @@ jobs:
run: |
git config --global --add safe.directory /home/runner/work/photoprism-freebsd-port/photoprism-freebsd-port
make package
for file in work/pkg/*.pkg;do mv $file ${file//\.pkg/-FreeBSD-$(uname -r).pkg}; done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:

48
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Release
on:
workflow_dispatch:
release:
types:
- published
jobs:
Build_Packages:
secrets: inherit
permissions:
contents: write
checks: write
actions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
uses: ./.github/workflows/build_pkg.yml
Upload_Artifacts:
needs: Build_Packages
permissions:
contents: write
checks: write
actions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: freebsd-14
path: target/
- uses: actions/download-artifact@v4
with:
name: freebsd-13
path: target/
- uses: alexellis/upload-assets@0.4.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '[ "target/*.pkg" ]'