2020-05-29 15:06:02 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.*"
|
|
|
|
- "**/testdata/**"
|
|
|
|
- ".ci/**"
|
|
|
|
- ".git*"
|
|
|
|
- ".github/workflows/releases.yml"
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "**.go"
|
|
|
|
- "go.*"
|
|
|
|
- "**/testdata/**"
|
|
|
|
- ".ci/**"
|
|
|
|
- ".git*"
|
|
|
|
- ".github/workflows/releases.yml"
|
2020-03-26 11:02:19 +01:00
|
|
|
|
2020-06-20 19:38:58 +02:00
|
|
|
name: GitHub CI
|
2020-03-26 11:02:19 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Get the version
|
|
|
|
id: get_version
|
2023-02-03 16:24:32 +01:00
|
|
|
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
2020-03-26 11:02:19 +01:00
|
|
|
|
2023-04-14 21:20:37 +02:00
|
|
|
- name: Check out code
|
2023-09-05 05:29:06 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-04-14 21:20:37 +02:00
|
|
|
|
2021-03-30 11:57:10 +02:00
|
|
|
- name: Set up Go
|
2023-12-07 04:49:26 +01:00
|
|
|
uses: actions/setup-go@v5
|
2020-03-26 11:02:19 +01:00
|
|
|
with:
|
2021-03-30 11:57:10 +02:00
|
|
|
go-version: 1
|
2023-08-11 13:45:09 +02:00
|
|
|
check-latest: true
|
2020-03-26 11:02:19 +01:00
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Test suite
|
|
|
|
run: |
|
|
|
|
go version
|
|
|
|
cd .ci
|
|
|
|
./ci-test.sh
|
|
|
|
cd -
|
|
|
|
|
|
|
|
- name: Build all
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
run: |
|
|
|
|
.ci/ci-build.sh "${{ steps.get_version.outputs.VERSION }}"
|
|
|
|
|
2023-11-03 18:14:47 +01:00
|
|
|
- name: Package
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
run: |
|
|
|
|
.ci/ci-package.sh "${{ steps.get_version.outputs.VERSION }}"
|
|
|
|
|
2020-03-26 11:02:19 +01:00
|
|
|
- name: Install minisign and sign
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y install libsodium-dev
|
|
|
|
git clone --depth 1 https://github.com/jedisct1/minisign.git
|
|
|
|
cd minisign/src
|
|
|
|
mkdir -p /tmp/bin
|
|
|
|
cc -O2 -o /tmp/bin/minisign -D_GNU_SOURCE *.c -lsodium
|
|
|
|
cd -
|
|
|
|
/tmp/bin/minisign -v
|
|
|
|
echo '#' > /tmp/minisign.key
|
|
|
|
echo "${{ secrets.MINISIGN_SK }}" >> /tmp/minisign.key
|
|
|
|
cd dnscrypt-proxy
|
|
|
|
echo | /tmp/bin/minisign -s /tmp/minisign.key -Sm *.tar.gz *.zip
|
|
|
|
ls -l dnscrypt-proxy*
|
|
|
|
|
|
|
|
- name: Create release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: Release ${{ github.ref }}
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
|
|
|
|
- name: Upload release assets
|
2024-07-19 05:38:16 +02:00
|
|
|
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
2020-03-26 11:02:19 +01:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
dnscrypt-proxy/*.zip
|
|
|
|
dnscrypt-proxy/*.tar.gz
|
|
|
|
dnscrypt-proxy/*.minisig
|
2023-11-03 18:14:47 +01:00
|
|
|
dnscrypt-proxy/*.msi
|