Skip to content

Version bump to 0.21 #23

Version bump to 0.21

Version bump to 0.21 #23

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- '*'
permissions:
contents: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called 'build'
build:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Setups python environment
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# Installs dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
# Runs build.sh
- name: Run build script
run: ./build.sh
# Creates ZIP archives
- name: Create ZIP archives
run: |
mkdir -p dist/clipboard-sync-client dist/clipboard-sync-server
zip -r clipboard-sync-client.zip dist/clipboard-sync-client
zip -r clipboard-sync-server.zip dist/clipboard-sync-server
# Creates Github Release and uploads ZIPs
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Automated release from the CI
draft: false
prerelease: false
- name: Upload Release Asset Client
id: upload-release-asset-client
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./clipboard-sync-client.zip
asset_name: clipboard-sync-client.zip
asset_content_type: application/zip
- name: Upload Release Asset Server
id: upload-release-asset-server
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./clipboard-sync-server.zip
asset_name: clipboard-sync-server.zip
asset_content_type: application/zip
package-arch:
runs-on: ubuntu-latest
needs: build # Ensure this runs after the build job
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: 'repo'
- name: Build PKGBUILD
uses: docker://archlinux:latest
with:
entrypoint: /bin/bash
args: -c "pacman -Sy --noconfirm base-devel git xclip clipcat && chown -R nobody repo && cd repo/arch-packages/client && sudo -u nobody makepkg -s && cd ../server && sudo -u nobody makepkg -s"
- name: Upload client package to Release
id: upload-client-package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build.outputs.upload_url }} # Ensure this uses the output from the build job
asset_path: ./repo/arch-packages/client/*.pkg.tar.zst
asset_name: clipboard-sync-client.pkg.tar.zst
asset_content_type: application/zstd
- name: Upload server package to Release
id: upload-server-package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build.outputs.upload_url }} # Ensure this uses the output from the build job
asset_path: ./repo/arch-packages/server/*.pkg.tar.zst
asset_name: clipboard-sync-server.pkg.tar.zst
asset_content_type: application/zstd