Skip to content

Commit

Permalink
ci: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Dec 27, 2024
1 parent fe7bc6a commit db2d0eb
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 263 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: build

permissions:
contents: write

on:
push:
tags:
- 'v*'
branches:
- '**'
paths:
- '.github/workflows/meta.yml'
- '.github/workflows/build.yml'
- 'assets/**'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/meta.yml'
- '.github/workflows/build.yml'
- 'assets/**'
workflow_dispatch:

jobs:
meta:
uses: ./.github/workflows/meta.yml

build:
needs: meta
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: |
go mod download
# release:
# if: ${{ needs.meta.outputs.is_release == 'true' }}
# needs: [meta, build]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v4
# with:
# path: assets
# - run: |
# mv -vf assets/changelog/* .
# rm -rf assets/changelog
# cd assets
# for f in *; do
# (cd $f && zip -r ../$f-${{ needs.meta.outputs.tag }}.zip .)
# done
# - uses: softprops/action-gh-release@v1
# with:
# body_path: CHANGELOG.md
# files: assets/*
# tag_name: ${{ needs.meta.outputs.tag }}
263 changes: 0 additions & 263 deletions .github/workflows/ci.yml

This file was deleted.

Loading

0 comments on commit db2d0eb

Please sign in to comment.