Skip to content

Merge pull request #65 from KenshiTech/v0.11.10 #177

Merge pull request #65 from KenshiTech/v0.11.10

Merge pull request #65 from KenshiTech/v0.11.10 #177

Workflow file for this run

name: Make release
env:
UBUNTU_VERSION: "latest"
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "."
steps:
- name: Checkout GitHub Action
uses: actions/checkout@main
- uses: actions/setup-go@v5
with:
go-version: "stable"
cache-dependency-path: |
src/go.sum
- name: Build
run: cd src && make prod
- name: "Run release script"
run: node scripts/docker-release.mjs ${{ github.ref_name }}
- name: "Release"
uses: softprops/action-gh-release@v1
with:
files: ./src/bin/*
name: Unchained ${{ github.ref_name}}
tag_name: ${{ github.ref_name }}
prerelease: false
push-store-image:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: "."
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Get Docker Tag
id: docker-tag
run: |
if echo "${{ steps.package-version.outputs.current-version }}" | grep -q rc; then \
echo "docker-tag=rc" >> $GITHUB_OUTPUT; \
else echo "docker-tag=latest" >> $GITHUB_OUTPUT; fi;
- name: Build and push
uses: docker/build-push-action@v2
with:
context: docker
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/kenshitech/unchained:${{ steps.docker-tag.outputs.docker-tag }}
ghcr.io/kenshitech/unchained:${{ github.ref_name }}
build-args: |
"UBUNTU_VERSION=${{ env.UBUNTU_VERSION }}"
"UNCHAINED_VERSION=${{ github.ref_name }}"