Fixed version change on aur publish #11
15
.github/workflows/build-and-release.yml
vendored
15
.github/workflows/build-and-release.yml
vendored
@@ -36,13 +36,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build (arm64)
|
- name: Build (arm64)
|
||||||
run: npm run build -- --arch arm64
|
run: npm run build -- --arch arm64
|
||||||
|
|
||||||
- name: Download appimagelint and its deps
|
- name: Download appimagelint and its deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt install fuse -y
|
sudo apt install fuse -y
|
||||||
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
|
wget https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage
|
||||||
chmod +x appimagelint-x86_64.AppImage
|
chmod +x appimagelint-x86_64.AppImage
|
||||||
|
|
||||||
- name: Check the appimage(s)
|
- name: Check the appimage(s)
|
||||||
run: ./appimagelint-x86_64.AppImage dist/*.AppImage
|
run: ./appimagelint-x86_64.AppImage dist/*.AppImage
|
||||||
|
|
||||||
@@ -208,19 +208,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: checksums
|
name: checksums
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
- name: List downloaded files
|
- name: List downloaded files
|
||||||
run: ls -R
|
run: ls -R
|
||||||
|
|
||||||
- name: Show content of sha256sum.txt
|
- name: Show content of sha256sum.txt
|
||||||
run: cat sha256sum.txt
|
run: cat sha256sum.txt
|
||||||
|
|
||||||
|
- name: Get app version
|
||||||
|
id: version
|
||||||
|
uses: pchynoweth/action-get-npm-version@1.1.1
|
||||||
|
|
||||||
- name: Extract checksum from sha256sum.txt and change build version
|
- name: Extract checksum from sha256sum.txt and change build version
|
||||||
run: |
|
run: |
|
||||||
echo releasever
|
|
||||||
new_checksum=$(awk 'NR==1 { print $1 }' ./sha256sum.txt)
|
new_checksum=$(awk 'NR==1 { print $1 }' ./sha256sum.txt)
|
||||||
sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD
|
sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD
|
||||||
sed -i "s/^pkgver=.*$/pkgver=${{ needs.release.outputs.version_tag }}/" ./build/PKGBUILD
|
sed -i "s/^pkgver=.*$/pkgver=${{ steps.version.outputs.version }}/" ./build/PKGBUILD
|
||||||
|
|
||||||
- name: Publish AUR package
|
- name: Publish AUR package
|
||||||
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||||
@@ -231,4 +234,4 @@ jobs:
|
|||||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
commit_message: New Version
|
commit_message: New Version
|
||||||
ssh_keyscan_types: rsa,ecdsa,ed25519
|
ssh_keyscan_types: rsa,ecdsa,ed25519
|
||||||
|
222
a.yml
Normal file
222
a.yml
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
name: Build and Release bsky-desktop
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [$default-branch]
|
||||||
|
pull_request:
|
||||||
|
branches: [$default-branch]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
name: Build bsky-desktop (Linux)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
ext: "AppImage"
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout git repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup node and npm
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build (x64)
|
||||||
|
run: npm run build -- --arch x64
|
||||||
|
|
||||||
|
- name: Build (arm64)
|
||||||
|
run: npm run build -- --arch arm64
|
||||||
|
|
||||||
|
- name: Upload Linux Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
id: upload-artifact
|
||||||
|
with:
|
||||||
|
name: linux-artifacts
|
||||||
|
path: |
|
||||||
|
dist/*.AppImage
|
||||||
|
dist/latest*.yml
|
||||||
|
|
||||||
|
- name: Generate checksum
|
||||||
|
run: |
|
||||||
|
sha256sum dist/*.AppImage > sha256sum.txt
|
||||||
|
|
||||||
|
- name: Upload checksums
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: checksums
|
||||||
|
path: sha256sum.txt
|
||||||
|
|
||||||
|
# build-windows:
|
||||||
|
# name: Build bsky-desktop (Windows)
|
||||||
|
# runs-on: windows-latest
|
||||||
|
# env:
|
||||||
|
# ext: "exe"
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout git repo
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Setup node and npm
|
||||||
|
# uses: actions/setup-node@v3
|
||||||
|
# with:
|
||||||
|
# node-version: 16
|
||||||
|
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: npm install
|
||||||
|
|
||||||
|
# - name: Build (x64)
|
||||||
|
# run: npm run build -- --arch x64
|
||||||
|
|
||||||
|
# - name: Build (arm64)
|
||||||
|
# run: npm run build -- --arch arm64
|
||||||
|
|
||||||
|
# - name: Upload Windows Artifacts
|
||||||
|
# uses: actions/upload-artifact@v4
|
||||||
|
# id: upload-artifact
|
||||||
|
# with:
|
||||||
|
# name: windows-artifacts
|
||||||
|
# path: |
|
||||||
|
# dist/*.exe
|
||||||
|
# dist/latest*.yml
|
||||||
|
|
||||||
|
# build-macos:
|
||||||
|
# name: Build bsky-desktop (macOS)
|
||||||
|
# runs-on: macos-latest
|
||||||
|
# env:
|
||||||
|
# ext: "dmg"
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout git repo
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Setup node and npm
|
||||||
|
# uses: actions/setup-node@v3
|
||||||
|
# with:
|
||||||
|
# node-version: 16
|
||||||
|
|
||||||
|
# - name: Install dependencies
|
||||||
|
# run: npm install
|
||||||
|
|
||||||
|
# - name: Build (x64)
|
||||||
|
# run: npm run build -- --arch x64
|
||||||
|
|
||||||
|
# - name: Build (arm64)
|
||||||
|
# run: npm run build -- --arch arm64
|
||||||
|
|
||||||
|
# - name: Upload macOS Artifacts
|
||||||
|
# uses: actions/upload-artifact@v4
|
||||||
|
# id: upload-artifact
|
||||||
|
# with:
|
||||||
|
# name: macos-artifacts
|
||||||
|
# path: |
|
||||||
|
# dist/*.dmg
|
||||||
|
# dist/latest*.yml
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Create Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-linux]
|
||||||
|
outputs:
|
||||||
|
version_tag: ${{ steps.version.outputs.version }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GHT }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout git repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get app version
|
||||||
|
id: version
|
||||||
|
uses: pchynoweth/action-get-npm-version@1.1.1
|
||||||
|
|
||||||
|
- name: Download Linux Artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: linux-artifacts
|
||||||
|
path: dist/linux
|
||||||
|
|
||||||
|
#- name: Download Windows Artifacts
|
||||||
|
# uses: actions/download-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: windows-artifacts
|
||||||
|
# path: dist/windows
|
||||||
|
|
||||||
|
#- name: Download macOS Artifacts
|
||||||
|
# uses: actions/download-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: macos-artifacts
|
||||||
|
# path: dist/macos
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -R dist
|
||||||
|
|
||||||
|
- name: Merge latest .ymls
|
||||||
|
uses: mikefarah/yq@v4.44.6
|
||||||
|
with:
|
||||||
|
cmd: yq ea '. as $item ireduce ({}; . * $item )' dist/*/*.yml > dist/combined.yml
|
||||||
|
|
||||||
|
- name: Upload Release
|
||||||
|
id: create_release
|
||||||
|
uses: softprops/action-gh-release@v2.1.0
|
||||||
|
with:
|
||||||
|
tag_name: "v${{ steps.version.outputs.version }}"
|
||||||
|
name: "bsky-desktop v${{ steps.version.outputs.version }}"
|
||||||
|
generate_release_notes: true
|
||||||
|
files: |
|
||||||
|
dist/linux/*.AppImage
|
||||||
|
# dist/windows/*.exe
|
||||||
|
# dist/macos/*.dmg
|
||||||
|
# dist/combined.yml
|
||||||
|
|
||||||
|
aur:
|
||||||
|
name: Publish to AUR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: release
|
||||||
|
env:
|
||||||
|
AUR_TOKEN: ${{ secrets.AUR_TOKEN }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout git repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Download checksums
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: checksums
|
||||||
|
path: ./sha256sum.txt
|
||||||
|
|
||||||
|
- name: Get app version
|
||||||
|
id: version
|
||||||
|
uses: pchynoweth/action-get-npm-version@1.1.1
|
||||||
|
|
||||||
|
- name: Extract checksum from sha256sum.txt and change build version
|
||||||
|
run: |
|
||||||
|
echo ${{ steps.version.outputs.version }}
|
||||||
|
new_checksum=$(awk 'NR==1 { print $1 }' ./sha256sum.txt)
|
||||||
|
sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD
|
||||||
|
sed -i "s/^pkgver=.*$/pkgver=${{ steps.version.outputs.version }}/" ./build/PKGBUILD
|
||||||
|
cat ./build/PKGBUILD
|
||||||
|
|
||||||
|
# - name: Publish AUR package
|
||||||
|
# if: false
|
||||||
|
# uses: KSXGitHub/github-actions-deploy-aur@3.0.1
|
||||||
|
# with:
|
||||||
|
# pkgname: bskydesktop
|
||||||
|
# pkgbuild: ./build/PKGBUILD
|
||||||
|
# commit_username: ${{ secrets.AUR_USERNAME }}
|
||||||
|
# commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
|
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
|
# commit_message: New Version
|
||||||
|
# ssh_keyscan_types: rsa,ecdsa,ed25519
|
Reference in New Issue
Block a user