Commit Diff


commit - fe09516fb3538e8e6e6288b0afc4afd95ac898df
commit + cf719f51746e18be5d04758039978f7b0e764a33
blob - c4c24b9e43167a26e32a52c15033e8c7a241146e
blob + 0128354cb3c8a83010cf4d567ac2fb1f68b9a18b
--- .github/workflows/publish.yaml
+++ .github/workflows/publish.yaml
@@ -31,9 +31,15 @@ jobs:
       - name: Setup luarocks
         run: sudo apt install -y luarocks
 
+      # Create a rockspec for the release.
+      - run: printf '%s=%s\n' TAG "${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
+      - run: sed -E
+          -e "s/branch = '.+'/tag = '${{ env.TAG }}'/g"
+          -e "s/version = '.+'/version = '${{ env.TAG }}-1'/g"
+          afl-lua-scm-1.rockspec > afl-lua-${{ env.TAG }}-1.rockspec
+
       # Make a release.
       - run: |
-          echo TAG=${GITHUB_REF##*/} >> $GITHUB_ENV
           luarocks new_version --tag ${{ env.TAG }}
           luarocks install afl-lua-${{ env.TAG }}-1.rockspec
           luarocks pack afl-lua-${{ env.TAG }}-1.rockspec