generated from deepin-community/template-repository-main
上传文件至 .github/workflows
Some checks failed
Build and Package Golang / build (push) Failing after 1m33s
Some checks failed
Build and Package Golang / build (push) Failing after 1m33s
This commit is contained in:
52
.github/workflows/main.yml
vendored
52
.github/workflows/main.yml
vendored
@ -19,22 +19,58 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y debhelper dh-golang build-essential wget
|
||||
wget https://go.dev/dl/go1.22.6.linux-amd64.tar.gz
|
||||
tar -C /usr/local -xzf go1.22.6.linux-amd64.tar.gz
|
||||
sudo apt-get install -y debhelper dh-golang build-essential wget lintian
|
||||
|
||||
- name: Download Golang source
|
||||
run: |
|
||||
wget https://go.dev/dl/go1.22.6.src.tar.gz
|
||||
tar -xzf go1.22.6.src.tar.gz
|
||||
mv go /usr/local/go-src
|
||||
|
||||
- name: Build Golang
|
||||
working-directory: /usr/local/go-src/src
|
||||
run: |
|
||||
export GOROOT_BOOTSTRAP=/usr/local/go
|
||||
cd src
|
||||
./make.bash
|
||||
|
||||
- name: Package into .deb
|
||||
- name: Set up environment
|
||||
run: |
|
||||
dpkg-buildpackage -us -uc
|
||||
echo 'export PATH=/usr/local/go/bin:$PATH' >> $GITHUB_ENV
|
||||
echo 'export PATH=/usr/local/go-src/bin:$PATH' >> $GITHUB_ENV
|
||||
|
||||
- name: Create Debian package structure
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
dh_make -s -y -n --createorig -p golang_1.22.6
|
||||
|
||||
- name: Customize Debian package files
|
||||
run: |
|
||||
cd build/debian
|
||||
# Replace control file with your configurations
|
||||
cat > control <<EOL
|
||||
Source: golang
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Your Name <your.email@example.com>
|
||||
Build-Depends: debhelper (>= 9), dh-golang, build-essential
|
||||
Standards-Version: 4.5.0
|
||||
Homepage: https://golang.org
|
||||
|
||||
Package: golang
|
||||
Architecture: amd64
|
||||
Depends: libc6 (>= 2.15)
|
||||
Description: The Go programming language
|
||||
Golang is an open source programming language that makes it easy
|
||||
to build simple, reliable, and efficient software.
|
||||
EOL
|
||||
|
||||
- name: Build Debian package
|
||||
working-directory: build
|
||||
run: |
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: golang-package
|
||||
path: ../*.deb
|
||||
path: build/../*.deb
|
||||
|
Reference in New Issue
Block a user