Add rolling release CI

This commit is contained in:
Demetrius Kanios 2026-08-03 17:45:50 -07:00
parent 881e92bece
commit d4fb356cb7

View File

@ -33,35 +33,41 @@ jobs:
- name: Test - name: Test
run: wasm32-wasip2-clang -o test_plugin.wasm -mexec-model=reactor -Iinstall/include install/lib/libpumpkin-api.a example/main.c run: wasm32-wasip2-clang -o test_plugin.wasm -mexec-model=reactor -Iinstall/include install/lib/libpumpkin-api.a example/main.c
- name: Set ARTIFACT_NAME - name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID
id: artifact-name
run: | run: |
set -eux
if [[ '${{ github.ref }}' = refs/tags/v* ]]; then if [[ '${{ github.ref }}' = refs/tags/v* ]]; then
tag='${{ github.ref }}' tag='${{ github.ref }}'
suffix="-${tag:11}" tag="${tag:10}"
artifactID="${tag:1}"
else else
suffix="-ci" tag=CI
artifactID='${{ github.sha }}'
artifactID="${artifactID:0:8}"
fi fi
echo "ARTIFACT_NAME=pumpkin-api$suffix" >> $GITHUB_OUTPUT echo "GITHUB_RELEASE_TAG=$tag" >> $GITHUB_ENV
echo "ARTIFACT_ID=$artifactID" >> $GITHUB_ENV
- name: Bundle - name: Bundle
env:
ARTIFACT_NAME: ${{ steps.artifact-name.outputs.ARTIFACT_NAME }}
run: | run: |
mv install $ARTIFACT_NAME mv install pumpkin-api-c-${ARTIFACT_ID}
tar -cvJf $ARTIFACT_NAME.tar.xz $ARTIFACT_NAME tar -cvJf pumpkin-api-c-${ARTIFACT_ID}.tar.xz pumpkin-api-c-${ARTIFACT_ID}
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v7 uses: actions/upload-artifact@v7
with: with:
archive: false archive: false
path: ${{ format('{0}.tar.xz', steps.artifact-name.outputs.ARTIFACT_NAME) }} path: ${{ format('pumpkin-api-c-{0}.tar.xz', env.ARTIFACT_ID) }}
- name: Upload artifacts to release - name: Upload artifacts to release
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2 uses: ncipollo/release-action@v1
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ env.GITHUB_RELEASE_TAG }}
tag: ${{ github.ref }} artifacts: ${{ format('pumpkin-api-c-{0}.tar.xz', env.ARTIFACT_ID) }}
file: ${{ format('{0}.tar.xz', steps.artifact-name.outputs.ARTIFACT_NAME) }} allowUpdates: true
overwrite: true omitPrereleaseDuringUpdate: true
omitName: true
omitBody: true
omitDraftDuringUpdate: true
removeArtifacts: true