Skip to content

v3.6.0-rc2

v3.6.0-rc2 #17

Workflow file for this run

name: Release
on:
release:
types:
- created
jobs:
build-pypi:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine wheel setuptools
- name: Build package
run: |
python -m build
- name: Check package
run: |
python -m twine check dist/*
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/* --skip-existing
build-linux-binary:
strategy:
matrix:
ubuntu-version: ["22.04", "24.04"]
runs-on: ubuntu-${{ matrix.ubuntu-version }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Build binary using install script
env:
UBUNTU_VERSION: ${{ matrix.ubuntu-version }}
run: |
bash script/install.sh
- name: Verify binary
run: |
ls -lh ./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }}
file ./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }}
- name: Test binary
run: |
./dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }} --help
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }}
path: dist/diffmanifests-linux-ubuntu${{ matrix.ubuntu-version }}
build-vscode-extension:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
working-directory: ./vscode
run: |
npm install
- name: Lint code
working-directory: ./vscode
run: |
npm run lint || true
- name: Compile TypeScript
working-directory: ./vscode
run: |
npm run compile
- name: Install vsce
run: |
npm install -g @vscode/vsce
- name: Create dist directory
run: |
mkdir -p dist
- name: Package extension
working-directory: ./vscode
run: |
vsce package ${{ steps.get_version.outputs.VERSION }} --out ../dist/diffmanifests.vsix
- name: Verify package
run: |
ls -lh ./dist/diffmanifests.vsix
- name: Upload extension artifact
uses: actions/upload-artifact@v4
with:
name: diffmanifests-vscode-extension
path: dist/diffmanifests.vsix
- name: Publish to VS Code Marketplace
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
continue-on-error: true
working-directory: ./vscode
env:
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
run: |
vsce publish ${{ steps.get_version.outputs.VERSION }} -p $VSCE_PAT --packagePath ../dist/diffmanifests.vsix
create-release:
needs: [build-pypi, build-linux-binary, build-vscode-extension]
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
diffmanifests-linux-ubuntu22.04/diffmanifests-linux-ubuntu22.04
diffmanifests-linux-ubuntu24.04/diffmanifests-linux-ubuntu24.04
diffmanifests-vscode-extension/diffmanifests.vsix
name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
## Installation
### PyPI Package
```bash
pip install diffmanifests
```
### Binary (Linux)
Download the binary for your Ubuntu version and make it executable:
```bash
chmod +x diffmanifests-linux-ubuntu*
./diffmanifests-linux-ubuntu* --help
```
### VS Code Extension
1. Download `diffmanifests.vsix`
2. Install in VS Code:
```bash
code --install-extension diffmanifests.vsix
```
Or install from [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=craftslab.diffmanifests)
See [documentation](https://github.com/craftslab/diffmanifests) for more details.
env:
GITHUB_TOKEN: ${{ secrets.CRAFTSLAB_TOKEN }}