Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
504e7bddb9 | ||
![]() |
2e7e2e1289 | ||
![]() |
3fabc7efbd |
89
.github/workflows/release.yaml
vendored
Normal file
89
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
cache: true
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo add-apt-repository -y ppa:i2p-maintainers/i2p
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y make git fakeroot checkinstall i2p i2p-router
|
||||
|
||||
- name: Build binaries
|
||||
run: |
|
||||
# Build for various platforms
|
||||
GOOS=linux GOARCH=amd64 make build
|
||||
GOOS=linux GOARCH=386 make build
|
||||
GOOS=linux GOARCH=arm make build
|
||||
GOOS=linux GOARCH=arm64 make build
|
||||
GOOS=openbsd GOARCH=amd64 make build
|
||||
GOOS=freebsd GOARCH=386 make build
|
||||
GOOS=freebsd GOARCH=amd64 make build
|
||||
GOOS=windows GOARCH=amd64 make build
|
||||
GOOS=windows GOARCH=386 make build
|
||||
|
||||
- name: Build Debian packages
|
||||
run: |
|
||||
# Build .deb packages
|
||||
sudo -u i2psvc mkdir -p /var/lib/i2p/i2p-config/reseed
|
||||
sudo mkdir -p /etc/systemd/system/reseed.service.d/
|
||||
sudo bash -c "GOOS=linux GOARCH=amd64 make checkinstall"
|
||||
sudo bash -c "GOOS=linux GOARCH=386 make checkinstall"
|
||||
sudo bash -c "GOOS=linux GOARCH=arm make checkinstall"
|
||||
sudo bash -c "GOOS=linux GOARCH=arm64 make checkinstall"
|
||||
|
||||
#- name: Build plugins
|
||||
#run: |
|
||||
## Build plugins for various platforms
|
||||
#GOOS=linux GOARCH=amd64 make su3s
|
||||
#GOOS=linux GOARCH=386 make su3s
|
||||
#GOOS=linux GOARCH=arm make su3s
|
||||
#GOOS=linux GOARCH=arm64 make su3s
|
||||
#GOOS=openbsd GOARCH=amd64 make su3s
|
||||
#GOOS=freebsd GOARCH=386 make su3s
|
||||
#GOOS=freebsd GOARCH=amd64 make su3s
|
||||
#GOOS=windows GOARCH=amd64 make su3s
|
||||
#GOOS=windows GOARCH=386 make su3s
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body_path: CHANGELOG.md
|
||||
files: |
|
||||
reseed-tools-*
|
||||
*.deb
|
||||
*.su3
|
||||
generate_release_notes: false
|
||||
draft: false
|
||||
prerelease: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Build and push Docker image
|
||||
# if: success()
|
||||
# run: |
|
||||
# docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
|
||||
# docker build -t ghcr.io/${{ github.repository }}:${{ github.ref_name }} .
|
||||
# docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }}
|
||||
# docker tag ghcr.io/${{ github.repository }}:${{ github.ref_name }} ghcr.io/${{ github.repository }}:latest
|
||||
# docker push ghcr.io/${{ github.repository }}:latest
|
Reference in New Issue
Block a user