1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-19 02:46:33 -05:00
v2fly/.github/workflows/deb.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

name: Build debian packages
on:
push:
release:
types: [prereleased]
jobs:
linux:
name: Debian sid
runs-on: ubuntu-latest
container: debian:sid
steps:
- name: Install git
run: |
apt-get update
apt-get install -y git
- name: Checking out sources
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
2020-11-07 22:24:18 -05:00
- name: Setup Repository
if: github.event_name == 'release' && !contains(github.ref, 'pre')
run: |
git clone https://github.com/v2fly/debian.git archive
2020-11-08 04:50:00 -05:00
echo ${{ secrets.DEBIAN_GPG_PRIVE }} | base64 -d > private.key
2020-11-07 22:24:18 -05:00
gpg --import private.key
cd archive
git config --local user.name "${{ github.actor }}"
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://${{ github.actor }}:${{ secrets.DEBIAN_REPO_TOKEN }}@github.com/v2fly/debian.git
reprepro includedeb ../*.deb
git add -A
git commit -am 'update'
2020-11-07 22:27:14 -05:00
git push origin main