Skip to content

chore: remove third-party notice from debian/copyright #18

chore: remove third-party notice from debian/copyright

chore: remove third-party notice from debian/copyright #18

Workflow file for this run

# .github/workflows/build-deb.yml
name: Build Debian Package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# 1. Checkout code with full history for versioning
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# 2. Set up the Go environment
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
# 3. Install all necessary packaging tools
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y debmake devscripts dh-golang
# 4. Run debmake to create the debian/ directory and its files
- name: Run debmake to create packaging files
run: debmake -y
# 5. (NEW) Verify that the debian/ directory was created
- name: Verify debian/ directory existence
run: |
if [ ! -d "debian" ]; then
echo "Error: debian/ directory was not created by debmake."
exit 1
fi
echo "Success: debian/ directory created."
ls -l
# 6. Create the watch file for checking new upstream versions
- name: Create debian/watch file
run: |
echo 'version=4' > debian/watch
echo 'opts="filenamemangle=s/.+\/v?(\d+\.\d+\.\d+)\.tar\.gz/arduino-cli-$1.tar.gz/" \' >> debian/watch
echo ' https://github.com/arduino/arduino-cli/tags .*/v?(\d+\.\d+\.\d+)\.tar\.gz' >> debian/watch
# 7. Create a proper changelog with the correct version
- name: Create changelog with dch
run: |
UPSTREAM_VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
dch --create --package arduino-cli --newversion "${UPSTREAM_VERSION}-1" "Initial release."
# 8. Manually create the correct rules file for a Go package
- name: Create Go-specific debian/rules
run: |
echo '#!/usr/bin/make -f' > debian/rules
echo 'export DH_GOLANG_INSTALL_ROOT_PACKAGE=$(shell go list -m)' >> debian/rules
echo '%' >> debian/rules
echo -e '\tdh $@ --with golang' >> debian/rules
# 9. Verify that all required files exist before building
- name: Verify Debian Files
run: ls -l debian/
# 10. Build the package
- name: Build the package
run: debuild -us -uc
# 11. Upload the final .deb file
- name: Upload .deb package
uses: actions/upload-artifact@v4
with:
name: arduino-cli-deb-package
path: ../*.deb