Skip to content

Update release command in go.yaml #24

Update release command in go.yaml

Update release command in go.yaml #24

Workflow file for this run

name: Go
on:
push:
branches: [ "master","main" ]
pull_request:
branches: [ "master","main" ]
env:
CARGO_TERM_COLOR: always
REGISTRY_USER: arloor
IMAGE_REGISTRY: docker.io
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build-and-push
run: |
go mod tidy
CGO_ENABLED=0 go build -ldflags '-w -s' -a -installsuffix cgo -o go_web_server go_web_server/cmd/go_web_server
podman build -f Dockerfile . -t docker.io/arloor/go_web_server:${{ github.sha }} -t docker.io/arloor/go_web_server:latest
podman login docker.io -u arloor -p ${{ env.REGISTRY_PASSWORD }}
podman push docker.io/arloor/go_web_server:${{ github.sha }}
podman push docker.io/arloor/go_web_server:latest
- name: gihub_release
env:
GH_TOKEN: ${{ github.token }}
run: |
if $(gh release delete v1.0.0 -y --cleanup-tag);
then echo "delete old release";
else echo "no old release";
fi
git config --local user.email "[email protected]"
git config --local user.name "arloor"
# git tag -f v1.0.0 -m 'latest'
# git push --force origin v1.0.0
# gh release create v1.0.0 go_web_server --notes-from-tag --latest -t latest
gh release create v1.0.0 go_web_server -n "latest" --latest -t latest --target main