Skip to content

ci: checkout repo first #3

ci: checkout repo first

ci: checkout repo first #3

Workflow file for this run

name: Release Version
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Environment
uses: ./.github/actions/setup-env
- name: Build
run: task core:release:${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}:${{ matrix.arch }}
- name: Zip Artifact
run: zip release/medama-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}_${{ matrix.arch }}.zip core/bin/${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}_${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}-${{ matrix.arch }}
path: release/${{ matrix.os == 'ubuntu-latest' && 'linux' || 'darwin' }}_${{ matrix.arch }}.zip
retention-days: 1
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: release-*
path: release
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release/*
draft: true
fail_on_unmatched_files: true
generate_release_notes: true