fix: udev rules overwrite — one rule per device instead of per vendor #54
Workflow file for this run
This file contains hidden or 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: Create GitHub Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| NOTES=$(awk "/^## \[$VERSION\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md | sed '/^$/N;/^\n$/d') | |
| echo "notes<<EOF" >> $GITHUB_OUTPUT | |
| echo "$NOTES" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Install uv and build wheel | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| export PATH="$HOME/.cargo/bin:$PATH" | |
| python3 --version | awk '{split($2,v,"."); print v[1]"."v[2]}' > .python-version | |
| uv build | |
| - name: Build .deb package | |
| run: bash debian/build-deb.sh | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body: ${{ steps.changelog.outputs.notes }} | |
| files: | | |
| dist/*.whl | |
| dist/*.tar.gz | |
| build/deb/*.deb | |
| draft: false | |
| prerelease: false | |
| aur-update: | |
| runs-on: ubuntu-latest | |
| needs: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute sha256 of source tarball | |
| id: vars | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| URL="https://github.com/loteran/Arctis-Sound-Manager/archive/refs/tags/${GITHUB_REF_NAME}.tar.gz" | |
| SHA=$(curl -sL "$URL" | sha256sum | awk '{print $1}') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "sha256=$SHA" >> $GITHUB_OUTPUT | |
| - name: Set up SSH for AUR | |
| env: | |
| AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$AUR_SSH_KEY" > ~/.ssh/aur_key | |
| chmod 600 ~/.ssh/aur_key | |
| ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts | |
| cat >> ~/.ssh/config << 'SSHCONF' | |
| Host aur.archlinux.org | |
| IdentityFile ~/.ssh/aur_key | |
| User aur | |
| SSHCONF | |
| - name: Clone AUR repository | |
| run: git clone ssh://aur@aur.archlinux.org/arctis-sound-manager.git /tmp/aur-repo | |
| - name: Patch PKGBUILD and .SRCINFO with real sha256 | |
| run: | | |
| SHA="${{ steps.vars.outputs.sha256 }}" | |
| sed "s/sha256sums=('SKIP')/sha256sums=('${SHA}')/" aur/PKGBUILD > /tmp/aur-repo/PKGBUILD | |
| sed "s/sha256sums = SKIP/sha256sums = ${SHA}/" aur/.SRCINFO > /tmp/aur-repo/.SRCINFO | |
| cp aur/arctis-sound-manager.install /tmp/aur-repo/arctis-sound-manager.install | |
| - name: Commit and push to AUR | |
| run: | | |
| cd /tmp/aur-repo | |
| git config user.name "loteran" | |
| git config user.email "axel.valadon@gmail.com" | |
| git add PKGBUILD .SRCINFO arctis-sound-manager.install | |
| git diff --cached --quiet && echo "No changes to push" && exit 0 | |
| git commit -m "Update to v${{ steps.vars.outputs.version }}" | |
| git push | |
| copr-build: | |
| runs-on: ubuntu-latest | |
| needs: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install copr-cli | |
| run: pip install copr-cli | |
| - name: Configure copr-cli | |
| env: | |
| COPR_API_CONFIG: ${{ secrets.COPR_API_CONFIG }} | |
| run: | | |
| mkdir -p ~/.config | |
| echo "$COPR_API_CONFIG" > ~/.config/copr | |
| - name: Trigger COPR build | |
| run: | | |
| copr-cli buildscm \ | |
| --clone-url https://github.com/loteran/Arctis-Sound-Manager \ | |
| --commit "${GITHUB_REF_NAME}" \ | |
| --method make_srpm \ | |
| --nowait \ | |
| loteran/arctis-sound-manager |