Skip to content

Update Events Fetching #90

Update Events Fetching

Update Events Fetching #90

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: app
shared-key: "code-fishing"
key: code-fishing
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Build
working-directory: ./web
run: NODE_ENV=production pnpm run build
- name: Build
working-directory: ./app
run: cargo build --release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: app
path: ./app/target/release/code-fishing
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
images: ghcr.io/v3xlabs/code-fishing
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Extract metadata (tags, labels) for Docker (master)
id: meta2
uses: docker/metadata-action@v4
if: startsWith(github.ref, 'refs/heads/master')
with:
images: ghcr.io/v3xlabs/code-fishing
tags: |
type=edge
type=sha
- name: Build Docker Image
uses: docker/build-push-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
context: ./app
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Build Docker Image (master)
uses: docker/build-push-action@v4
if: startsWith(github.ref, 'refs/heads/master')
with:
context: ./app
push: true
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
cache-from: type=gha
# cache-to: type=gha,mode=max
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./app/target/release/code-fishing