Skip to content

handle closing of meta channels #13

handle closing of meta channels

handle closing of meta channels #13

Workflow file for this run

name: Test + Release gastrodon/psyduck
on:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Run tests
run: go test ./... -v -count 1 -cover -coverprofile=coverage.out -timeout 5m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: gastrodon/psyduck
release-docker:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u gastrodon --password-stdin docker.io
- name: Build and Push Docker image
run: |
docker build . -t gastrodon/psyduck:latest
docker tag gastrodon/psyduck:latest gastrodon/psyduck:${{github.ref_name}}
docker push gastrodon/psyduck:latest
docker push gastrodon/psyduck:${{github.ref_name}}
release-binary:
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Build binary
run: go build -o psyduck .
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: psyduck
repository: gastrodon/psyduck
tag_name: ${{ github.ref_name }}
release_name: Psyduck ${{ github.ref_name }}