mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
Refine debian package workflow
This commit is contained in:
parent
7217d6f0de
commit
20fcb73d74
18
.github/workflows/deb.yml
vendored
18
.github/workflows/deb.yml
vendored
@ -2,12 +2,15 @@ name: Build debian packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "**/*.go"
|
||||
release:
|
||||
types: [prereleased]
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
name: Debian sid
|
||||
build:
|
||||
if: github.repository == 'v2fly/v2ray-core'
|
||||
runs-on: ubuntu-latest
|
||||
container: debian:sid
|
||||
|
||||
@ -16,27 +19,33 @@ jobs:
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y git
|
||||
- name: Checking out sources
|
||||
|
||||
- name: Checkout codebase
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
apt-get install -y build-essential dh-golang golang-any
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cp -r release/debian .
|
||||
dpkg-buildpackage -us -uc -i -b
|
||||
|
||||
- name: Copy binary
|
||||
run: |
|
||||
cp ../*.deb ./
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: v2ray-debian-packages
|
||||
path: ./*.deb
|
||||
|
||||
- name: Setup Repository
|
||||
if: github.event_name == 'release' && !contains(github.ref, 'pre')
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
git clone https://github.com/v2fly/debian.git archive
|
||||
echo ${{ secrets.DEBIAN_GPG_PRIVE }} | base64 -d > private.key
|
||||
@ -49,4 +58,3 @@ jobs:
|
||||
git add -A
|
||||
git commit -am 'update'
|
||||
git push origin main
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user