generated from deepin-community/template-repository-main
上传文件至 .github/workflows
This commit is contained in:
37
.github/workflows/main.yml
vendored
Normal file
37
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: Build and Package Golang
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y debhelper dh-golang build-essential
|
||||
|
||||
- name: Build Golang
|
||||
run: |
|
||||
cd src/src
|
||||
./make.bash
|
||||
|
||||
- name: Package into .deb
|
||||
run: |
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: golang-package
|
||||
path: ../*.deb
|
Reference in New Issue
Block a user