Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release artifacts #22

Merged
merged 8 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: Publish Docker image

on:
push:
branches: [c4t]
release:
types: [published]

jobs:
push_to_dockerhub:
name: Push Docker image to dockerhub
runs-on: ubuntu-latest

steps:
- name: Check out the repo
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
ref: ${{ github.event.release.tag }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand All @@ -26,4 +30,4 @@ jobs:
push: true
tags: |
c4tplatform/camino-messenger-bot:latest
c4tplatform/camino-messenger-bot:${{ github.sha }}
c4tplatform/camino-messenger-bot:${{ github.event.release.tag }}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish Release Artifcats

on:
release:
types: [published]

permissions:
contents: write

jobs:
release:
name: Publish Artifcats
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
ref: ${{ github.event.release.tag }}

- uses: actions/setup-go@v5
with:
go-version: '1.20'

- name: Install libolm
run: sudo apt update && sudo apt-get install -y libolm-dev

- name: Build
run: ./scripts/build.sh

- name: upload release assets
run: |
cp ./build/bot ./camino-messenger-bot
tar -zcvf camino-messenger-bot-linux-amd64-${{ github.event.release.tag }}.tar.gz ./camino-messenger-bot
gh release upload ${{ github.event.release.tag }} camino-messenger-bot-linux-amd64-${{ github.event.release.tag }}.tar.gz
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash

Loading