diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..38f1f55 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,47 @@ +name: Build artifact +run-name: Build from ${{ gitea.actor }} 🚀 +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: InnkeeperBot + path: ./InnkeeperBot + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(gitea.event.ref, 'refs/tags/v') + steps: + - uses: actions/download-artifact@v2 + with: + name: InnkeeperBot + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + - name: Release artifact + id: use-go-action + uses: https://gitea.com/actions/release-action@main + with: + files: |- + InnkeeperBot + api_key: '${{secrets.RELEASE_TOKEN}}' + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ef5ff1b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM scratch + +COPY InnkeeperBot / +RUN chmod a+x /InnkeeperBot