9 Commits

Author SHA1 Message Date
c20a3fdbc8 Merge pull request 'Add automatic CI to build artifacts' (#1) from feature/workflows into master
All checks were successful
Build artifact / build (push) Successful in 35s
Build artifact / release (push) Has been skipped
Reviewed-on: #1
2024-07-09 20:43:42 +00:00
36a543f3b9 workflow: Move release condition
All checks were successful
Build artifact / build (push) Successful in 38s
Build artifact / release (push) Has been skipped
2024-07-09 22:39:28 +02:00
MatteoSchiff
2abf750fc6 ci: Release only on tag set
All checks were successful
Build artifact / build (push) Successful in 21s
Build artifact / release (push) Successful in 14s
2024-03-13 14:58:37 +01:00
MatteoSchiff
51fa77b84b workflow: go-action requires go
All checks were successful
Build artifact / build (push) Successful in 18s
Build artifact / release (push) Successful in 23s
2024-03-13 14:46:50 +01:00
MatteoSchiff
f1d241ee6a workflows: Publish release using a job
Some checks failed
Build artifact / build (push) Successful in 17s
Build artifact / release (push) Failing after 9s
2024-03-13 14:44:06 +01:00
MatteoSchiff
29f03992a4 workflows: Add release workflow
All checks were successful
Build artifact / build (push) Successful in 18s
2024-03-13 14:28:50 +01:00
MatteoSchiff
d95946bd4d workflows: Fix upload-artifact version not supported
All checks were successful
Build artifact / build (push) Successful in 34s
2024-03-13 13:22:39 +01:00
MatteoSchiff
611f73f48a workflows: Update actions
Some checks failed
Build artifact / build (push) Failing after 41s
2024-03-13 13:17:25 +01:00
MatteoSchiff
d9ba3867f9 workflows: Add build workflow
Some checks failed
Build artifact / build (push) Failing after 23s
2024-03-13 12:44:35 +01:00
2 changed files with 51 additions and 0 deletions

View File

@@ -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}}'

4
Dockerfile Normal file
View File

@@ -0,0 +1,4 @@
FROM scratch
COPY InnkeeperBot /
RUN chmod a+x /InnkeeperBot