Skip to content

.github/workflows/release.yml #4

.github/workflows/release.yml

.github/workflows/release.yml #4

Workflow file for this run

name: release
on:
release:
types: [created]
jobs:
build-asset-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: nowsprinting/check-version-format-action@v4.0.1
id: version
with:
prefix: "v"
- name: Replace tag
run: |
TAG=${{ steps.version.outputs.full }}
echo "Replacing tag with $TAG"
sed -i "s/^\(version\s*=\s*\"\).*\(\".*\)$/\1$TAG\2/" "Cargo.lock"
sed -i "s/^\(VERSION\s*=\s*\"\).*\(\".*\)$/\1$TAG\2/" "debian-build.sh"
sed -i "s/^\(Version\s*:\s*\).*\(.*\)$/\1$TAG\2/" "debian/DEBIAN/control"
- name: Build debian package
uses: ./.github/workflows/build.yml
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: "🔖 auto update version 🤖"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Release Asset
uses: softprops/action-gh-release@v1
with:
files: capslock*.deb