Update release.yml #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release QuickStart Projects | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Zip each project | |
| run: | | |
| mkdir -p dist | |
| for dir in Projects/*/; do | |
| name=$(basename "$dir") | |
| output="$GITHUB_WORKSPACE/dist/OneAI_${name}.zip" | |
| echo "Zipping contents of $dir -> $output" | |
| ( | |
| cd "$dir" | |
| zip -r "$output" . | |
| ) | |
| done | |
| ls -lh dist/ | |
| - name: Create or update release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: "1.0" | |
| name: "QuickStart Projects v1.0" | |
| body: "All OneAI QuickStart project datasets and models, packaged for use with ONE AI." | |
| artifacts: "dist/*.zip" | |
| allowUpdates: true | |
| replacesArtifacts: true | |
| makeLatest: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |