-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (44 loc) · 1.41 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Remove existing artifacts
run: rm csv/*
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
load: true
tags: ${{ github.repository }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Docker image
run: docker run --name llm-leaderboard-csv ${{ github.repository }}
- name: Copy Docker container artifacts
run: docker cp llm-leaderboard-csv:/home/docker/csv/ ./
- name: Set release name as current date
run: |
echo "RELEASE_NAME=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Commit latest artifacts
uses: endbug/add-and-commit@v9
with:
add: csv
default_author: github_actions
message: "auto: update csv outputs to version ${{ env.RELEASE_NAME }}"
tag: ${{ env.RELEASE_NAME }}
- name: Upload the latest artifacts to releases
uses: ncipollo/release-action@v1
with:
artifacts: "csv/*"
makeLatest: true
name: ${{ env.RELEASE_NAME }}
tag: ${{ env.RELEASE_NAME }}