Skip to content

Commit

Permalink
Update CI for GoReleaser
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Maireaux <[email protected]>
  • Loading branch information
flemzord committed Feb 17, 2022
1 parent 696ca02 commit c7f0b4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 104 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ jobs:
name: 'Build'
needs:
- build_control
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
include:
- os: windows-latest
file: windows
- os: ubuntu-latest
file: default
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
Expand All @@ -59,20 +51,19 @@ jobs:
name: control-dist
path: cmd/control/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
mkdir ../../osxcross
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
- name: Downgrade libssl
if: matrix.os == 'ubuntu-latest'
run: |
echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' | sudo tee -a /etc/apt/sources.list
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev
- run: sudo apt install gcc-mingw-w64 -y
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --parallelism 4 --rm-dist --skip-validate --snapshot --config .github/.goreleaser.${{matrix.file}}.yml
args: build --parallelism 4 --rm-dist --skip-validate --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68 changes: 0 additions & 68 deletions .github/workflows/pr.yml

This file was deleted.

15 changes: 3 additions & 12 deletions .github/workflows/pr_open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,7 @@ jobs:
- Test_sqlite
- Test_postgres
- Lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
include:
- os: windows-latest
file: windows
- os: ubuntu-latest
file: default
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
Expand All @@ -155,21 +147,20 @@ jobs:
name: control-dist
path: cmd/control/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
mkdir ../../osxcross
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
- name: Downgrade libssl
if: matrix.os == 'ubuntu-latest'
run: |
echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' | sudo tee -a /etc/apt/sources.list
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev
- run: sudo apt install gcc-mingw-w64 -y
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: build --parallelism 4 --rm-dist --skip-validate --snapshot --config .github/.goreleaser.${{matrix.file}}.yml
args: build --parallelism 4 --rm-dist --skip-validate --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v2
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ jobs:
name: 'Build Binary'
needs:
- build_control
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
include:
- os: windows-latest
file: windows
- os: ubuntu-latest
file: default
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
Expand All @@ -55,24 +47,23 @@ jobs:
name: control-dist
path: cmd/control/
- name: OSXCross for CGO Support
if: matrix.os == 'ubuntu-latest'
run: |
mkdir ../../osxcross
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
- name: Downgrade libssl
if: matrix.os == 'ubuntu-latest'
run: |
echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' | sudo tee -a /etc/apt/sources.list
sudo apt update && apt-cache policy libssl1.0-dev
sudo apt-get install libssl1.0-dev
- run: sudo apt install gcc-mingw-w64 -y
- name: Run GoReleaser
env:
GITHUB_TOKEN: ${{ secrets.NUMARY_GITHUB_TOKEN }}
FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --parallelism 4 --rm-dist --skip-validate --config .github/.goreleaser.${{matrix.file}}.yml
args: release --parallelism 4 --rm-dist --skip-validate
build_docker:
name: 'Build & Publish Docker'
runs-on: ubuntu-latest
Expand Down

0 comments on commit c7f0b4c

Please sign in to comment.