Skip to content

chore(deps): update softprops/action-gh-release action to v2.0.5 #30

chore(deps): update softprops/action-gh-release action to v2.0.5

chore(deps): update softprops/action-gh-release action to v2.0.5 #30

Workflow file for this run

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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- 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@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
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')