Skip to content

feat(sd_world): add Neovim (lazy.nvim) plugin updates #208

feat(sd_world): add Neovim (lazy.nvim) plugin updates

feat(sd_world): add Neovim (lazy.nvim) plugin updates #208

Workflow file for this run

name: Release
on:
push:
tags:
- '*.*.*'
jobs:
update-formula:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Calculate SHA256
id: sha
env:
REPOSITORY: ${{ github.repository }}
TAG_NAME: ${{ github.ref_name }}
run: |
url="https://github.com/${REPOSITORY}/archive/refs/tags/${TAG_NAME}.tar.gz"
sha256=$(curl -sL "${url}" | shasum -a 256 | awk '{print $1}')
echo "sha256=${sha256}" >> "${GITHUB_OUTPUT}"
- name: Update formula and APKBUILD
env:
REPOSITORY: ${{ github.repository }}
TAG_NAME: ${{ github.ref_name }}
SHA256: ${{ steps.sha.outputs.sha256 }}
run: |
sed -i "s|url \".*\"|url \"https://github.com/${REPOSITORY}/archive/refs/tags/${TAG_NAME}.tar.gz\"|" Formula/pancake.rb
sed -i "s|sha256 \".*\"|sha256 \"${SHA256}\"|" Formula/pancake.rb
sed -i "s|pkgver=.*|pkgver=${TAG_NAME}|" APKBUILD
- name: Commit and push updates
env:
TAG_NAME: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY: ${{ github.repository }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add Formula/pancake.rb APKBUILD
git commit -m "chore: bump to ${TAG_NAME}"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPOSITORY}.git"
git push origin HEAD:master