Skip to content

Commit

Permalink
chore(ci): release on push tags
Browse files Browse the repository at this point in the history
  • Loading branch information
moetayuko committed Nov 19, 2023
1 parent ab069c2 commit 8700825
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/build-epyc7002.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Build i915 for DSM epyc7002

on:
workflow_dispatch:
push:
tags:
- "*-dsm-*"

jobs:
build:
Expand All @@ -11,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download toolchain
run: |
Expand All @@ -35,8 +38,36 @@ jobs:
make defconfig-drm
make -j$(nproc) modules_copy
- name: Save Build Result
- name: Pack modules
run: zip -j i915_dsm-${{ matrix.version }}_epyc7002.zip out/modules/*

- name: Save to artifacts
uses: actions/upload-artifact@v3
with:
name: i915_dsm-${{ matrix.version }}_epyc7002
path: out/modules/
path: i915_dsm-${{ matrix.version }}_epyc7002.zip

release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Append tag to filename
working-directory: artifacts
run: |
find . -name "i915_dsm-*.zip" -print0 | while read -d $'\0' f; do
mv $f ${f%.*}_${GITHUB_REF##*/}.zip
done
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: versions
files: artifacts/**/i915_dsm-*.zip

0 comments on commit 8700825

Please sign in to comment.