Skip to content

feat: update nightly workflow zip name format #2

feat: update nightly workflow zip name format

feat: update nightly workflow zip name format #2

Workflow file for this run

name: nightly
permissions:
contents: write
on:
schedule:
- cron: '0 10 * * *'
push:
paths:
- '.github/workflows/nightly.yml'
jobs:
init:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const releases = await github.rest.repos.listReleases({
owner: context.repo.owner,
repo: context.repo.repo,
});
for (const release of releases.data) {
if (release.tag_name === 'nightly') {
await github.rest.repos.deleteRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
});
}
}
try {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `tags/nightly`,
});
} catch (error) {}
nightly:
needs: init
strategy:
matrix:
platform:
- runner: ubuntu-latest
os: ubuntu-latest
- runner: windows-latest
os: windows-latest
- runner: macos-latest
os: macos-latest
runs-on: ${{ matrix.platform.runner }}
steps:
- uses: actions/checkout@v4
- uses: actboy168/action-zip@main
id: zip
with:
name: iamai-${{ matrix.platform.runner }}-${{ github.sha }}
path: |
src/*
README.rst
COPYING
- uses: softprops/action-gh-release@v1
with:
name: nightly
tag_name: nightly
fail_on_unmatched_files: true
files: ${{ steps.zip.outputs.output }}