Errant binary #214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: shui | |
on: | |
- push | |
permissions: | |
contents: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Tests | |
run: | | |
pushd cmd/shui | |
go mod tidy # FIXME I don't know why this is necessary. | |
go test | |
popd | |
go test internal/lib/* | |
go test pkg/storage/* | |
release-test: | |
if: ${{ !startsWith(github.ref, 'refs/tags') }} # Only run on non-tags. | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- uses: goreleaser/goreleaser-action@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: release --snapshot --clean --skip=announce,publish | |
distribution: goreleaser | |
version: latest | |
- run: | | |
podman build \ | |
--file build/package/Containerfile \ | |
--tag spacez320/shui:${{ github.sha }} \ | |
. | |
release: | |
if: ${{ startsWith(github.ref, 'refs/tags') }} # Only run on tags. | |
needs: | |
- test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- uses: goreleaser/goreleaser-action@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: release --clean --skip=announce | |
distribution: goreleaser | |
version: latest | |
- env: | |
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
DOCKER_HUB_USERNAME: spacez320 | |
run: | | |
podman login --password $DOCKER_HUB_TOKEN --username $DOCKER_HUB_USERNAME | |
podman build \ | |
--file build/package/Containerfile \ | |
--tag spacez320/shui:${{ github.sha }} \ | |
. | |
podman tag \ | |
spacez320/shui:${{ github.sha }} \ | |
spacez320/shui:${{ github.ref_name }} \ | |
spacez320/shui:latest | |
podman push spacez320/shui:${{ github.ref_name }} | |
podman push spacez320/shui:latest |