Skip to content

chore: Release runo version 0.2.1 #29

chore: Release runo version 0.2.1

chore: Release runo version 0.2.1 #29

Workflow file for this run

name: release
on:
push:
tags:
- v*.*.*
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
name: Create a Github release
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/install@v0.1
with:
crate: convco
version: latest
- uses: actions-rs/install@v0.1
with:
crate: cargo-release
version: latest
- name: Create changelog
run: convco changelog > CHANGELOG.md
- name: Build binary
run: cargo build -r
- name: Generate checksums
run: |
cd target/release
sha256sum runo > checksum.txt
- name: Generate changelog
run: |
convco changelog $(git tag --list --sort=version:refname | tail -2 | head -1 )..$(git tag --list --sort=version:refname | tail -1 ) > CHANGELOG.md
- name: Create Github release
uses: ncipollo/release-action@v1
with:
artifacts: "target/release/runo,target/release/checksum.txt"
bodyFile: "CHANGELOG.md"
image:
name: Build and push image
runs-on: ubuntu-latest
needs: release
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Debug
run: |
echo "github.ref -> {{ github.ref }}"
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
- name: Build and push image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}