bedrocktool/.github/workflows/build.yml

46 lines
1.0 KiB
YAML
Raw Normal View History

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:
run:
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
# version number
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
2022-08-12 17:55:51 +00:00
if: ${{ !env.ACT }}
2022-08-11 21:06:36 +00:00
# build
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-12 17:55:51 +00:00
- name: decrypt
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 16:28:39 +00:00
if: ${{ !env.ACT }}
2022-08-11 20:22:39 +00:00
2022-08-21 16:28:39 +00:00
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
2022-08-11 20:22:39 +00:00
with:
2022-08-21 16:28:39 +00:00
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}