2022-08-11 20:22:39 +00:00
|
|
|
name: ci-build
|
|
|
|
on:
|
2022-08-11 20:34:08 +00:00
|
|
|
push
|
2022-08-11 20:22:39 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-08-21 17:31:16 +00:00
|
|
|
build:
|
2022-08-11 20:22:39 +00:00
|
|
|
name: Build
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-08-11 20:38:49 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-08-11 21:06:36 +00:00
|
|
|
|
2022-08-11 20:22:39 +00:00
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: '1.19'
|
|
|
|
check-latest: true
|
|
|
|
cache: true
|
2022-08-21 17:31:16 +00:00
|
|
|
|
2022-08-12 17:55:51 +00:00
|
|
|
- name: decrypt
|
2022-08-21 17:31:16 +00:00
|
|
|
if: ${{ !env.ACT }}
|
2022-08-12 17:55:51 +00:00
|
|
|
run: |
|
2022-08-12 18:02:40 +00:00
|
|
|
sudo apt update -y
|
|
|
|
sudo apt install git-crypt xxd -y
|
2022-08-12 17:55:51 +00:00
|
|
|
echo ${REPO_KEY} | xxd -r -p > ../bedrock-repo-key.key
|
|
|
|
git-crypt unlock ../bedrock-repo-key.key
|
|
|
|
rm ../bedrock-repo-key.key
|
|
|
|
env:
|
|
|
|
REPO_KEY: ${{ secrets.REPO_KEY }}
|
2022-08-21 17:31:16 +00:00
|
|
|
|
|
|
|
- run: go get
|
2022-08-11 20:22:39 +00:00
|
|
|
|
2022-08-21 17:31:16 +00:00
|
|
|
- name: build
|
|
|
|
run: make -j
|
|
|
|
|
|
|
|
- uses: actions-ecosystem/action-get-latest-tag@v1
|
|
|
|
id: get-latest-tag
|
|
|
|
|
2022-08-22 20:32:19 +00:00
|
|
|
- name: update latest Release
|
2022-08-22 10:56:02 +00:00
|
|
|
if: "!(startsWith(github.ref, 'refs/tags/v'))"
|
2022-08-22 20:32:19 +00:00
|
|
|
uses: ncipollo/release-action@v1.10.0
|
2022-08-21 17:31:16 +00:00
|
|
|
with:
|
2022-08-22 20:32:19 +00:00
|
|
|
allowUpdates: true
|
|
|
|
artifacts: dist/*
|
2022-09-04 11:13:45 +00:00
|
|
|
tag: ${{ steps.get-latest-tag.outputs.tag }}
|
2022-08-21 17:31:16 +00:00
|
|
|
prerelease: true
|
2022-08-23 20:59:50 +00:00
|
|
|
removeArtifacts: true
|