Skip to content

Commit

Permalink
💚 fix publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ad2ien committed Feb 27, 2024
1 parent 76a4670 commit b2711b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main

workflow_dispatch:
workflow_call:

jobs:
build:
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,37 @@ on:
types: [created]

jobs:
prepare-release:
build-ok:
uses: ./.github/workflows/build.yml

build-asset-release:
runs-on: ubuntu-latest
needs: build-ok
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: nowsprinting/check-version-format-action@v3
- uses: nowsprinting/check-version-format-action@v4.0.1
id: version
with:
prefix: "v"

- name: Replace tag
run: |
TAG=${{ steps.version.outputs.full }}
TAG=${{ steps.version.outputs.full_without_prefix }}
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/" "Cargo.toml"
sed -i "s/^\(VERSION\s*=\s*\"\).*\(\".*\)$/\1$TAG\2/" "debian-build.sh"
sed -i "s/^\(Version\s*:\s*\).*\(.*\)$/\1$TAG\2/" "debian/DEBIAN/control"
build:
if: github.ref == 'refs/heads/main'
needs: prepare-release
uses: ./.github/workflows/build.yml
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev xorg-dev libxdo-dev

release:
runs-on: ubuntu-latest
needs:
- build
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create debian package
run: ./debian-build.sh

- name: Commit & Push changes
uses: actions-js/push@master
Expand Down

0 comments on commit b2711b3

Please sign in to comment.