|
@@ -2,12 +2,15 @@ name: Build debian packages
|
|
|
|
|
|
|
|
on:
|
|
on:
|
|
|
push:
|
|
push:
|
|
|
|
|
+ branches: [master]
|
|
|
|
|
+ paths:
|
|
|
|
|
+ - "**/*.go"
|
|
|
release:
|
|
release:
|
|
|
types: [prereleased]
|
|
types: [prereleased]
|
|
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
|
- linux:
|
|
|
|
|
- name: Debian sid
|
|
|
|
|
|
|
+ build:
|
|
|
|
|
+ if: github.repository == 'v2fly/v2ray-core'
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
container: debian:sid
|
|
container: debian:sid
|
|
|
|
|
|
|
@@ -16,27 +19,33 @@ jobs:
|
|
|
run: |
|
|
run: |
|
|
|
apt-get update
|
|
apt-get update
|
|
|
apt-get install -y git
|
|
apt-get install -y git
|
|
|
- - name: Checking out sources
|
|
|
|
|
|
|
+
|
|
|
|
|
+ - name: Checkout codebase
|
|
|
uses: actions/checkout@v2
|
|
uses: actions/checkout@v2
|
|
|
with:
|
|
with:
|
|
|
submodules: 'recursive'
|
|
submodules: 'recursive'
|
|
|
|
|
+
|
|
|
- name: Install build dependencies
|
|
- name: Install build dependencies
|
|
|
run: |
|
|
run: |
|
|
|
apt-get install -y build-essential dh-golang golang-any
|
|
apt-get install -y build-essential dh-golang golang-any
|
|
|
|
|
+
|
|
|
- name: Build
|
|
- name: Build
|
|
|
run: |
|
|
run: |
|
|
|
cp -r release/debian .
|
|
cp -r release/debian .
|
|
|
dpkg-buildpackage -us -uc -i -b
|
|
dpkg-buildpackage -us -uc -i -b
|
|
|
|
|
+
|
|
|
- name: Copy binary
|
|
- name: Copy binary
|
|
|
run: |
|
|
run: |
|
|
|
cp ../*.deb ./
|
|
cp ../*.deb ./
|
|
|
|
|
+
|
|
|
- name: Upload artifact
|
|
- name: Upload artifact
|
|
|
uses: actions/upload-artifact@v2
|
|
uses: actions/upload-artifact@v2
|
|
|
with:
|
|
with:
|
|
|
name: v2ray-debian-packages
|
|
name: v2ray-debian-packages
|
|
|
path: ./*.deb
|
|
path: ./*.deb
|
|
|
|
|
+
|
|
|
- name: Setup Repository
|
|
- name: Setup Repository
|
|
|
- if: github.event_name == 'release' && !contains(github.ref, 'pre')
|
|
|
|
|
|
|
+ if: github.event_name == 'release'
|
|
|
run: |
|
|
run: |
|
|
|
git clone https://github.com/v2fly/debian.git archive
|
|
git clone https://github.com/v2fly/debian.git archive
|
|
|
echo ${{ secrets.DEBIAN_GPG_PRIVE }} | base64 -d > private.key
|
|
echo ${{ secrets.DEBIAN_GPG_PRIVE }} | base64 -d > private.key
|
|
@@ -49,4 +58,3 @@ jobs:
|
|
|
git add -A
|
|
git add -A
|
|
|
git commit -am 'update'
|
|
git commit -am 'update'
|
|
|
git push origin main
|
|
git push origin main
|
|
|
-
|
|
|