chore(deps): update actions/checkout action to v4.1.4 #22
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
branches: | |
- main | |
- 'renovate/**' | |
paths: | |
- .github/workflows/release.yml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- .github/workflows/release.yml | |
jobs: | |
check: | |
name: Check | |
uses: ./.github/workflows/check.yml | |
luarocks-upload-and-github-release: | |
name: LuaRocks Upload & GitHub Release | |
runs-on: ubuntu-latest | |
needs: check | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Setup Lua | |
uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0 | |
- name: Setup LuaRocks | |
uses: hishamhm/gh-actions-luarocks@master | |
- name: Modify rockspec & upload to LuaRocks server | |
run: | | |
set -x | |
version="${{ github.ref_name }}" | |
rockspec="fenster-${version#v}-1.rockspec" | |
git mv fenster-dev-1.rockspec "$rockspec" | |
sed -i -E "s/\bversion\s*=\s*('|\"|\[\[)\s*[a-zA-Z0-9.-]+\s*('|\"|\]\])/version = '${version#v}-1'/" "$rockspec" | |
sed -i -E "s/\bbranch\s*=\s*('|\"|\[\[)\s*[a-zA-Z0-9.-_\/]+\s*('|\"|\]\])/tag = '$version'/" "$rockspec" | |
git diff | |
if [[ -z "$(git status --porcelain "$rockspec")" ]]; then | |
echo "Rockspec not modified" | |
exit 1 | |
fi | |
luarocks install dkjson | |
luarocks upload --temp-key "${{ secrets.LUAROCKS_API_KEY }}" "$rockspec" | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
- name: Draft release on GitHub | |
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 | |
with: | |
draft: true | |
generate_release_notes: true | |
files: | | |
fenster-*-1.rockspec | |
fenster-*-1.src.rock | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') |