Skip to content

Update packages

Update packages #80

Workflow file for this run

name: release
on:
pull_request:
push:
tags:
- 'v*'
jobs:
release:
if: github.repository_owner == 'appthreat'
concurrency: release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- uses: sbt/setup-sbt@v1
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"
tools: composer:v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '21.x'
- name: Delete `.rustup` directory
run: rm -rf /home/runner/.rustup # to save disk space
if: runner.os == 'Linux'
- name: Delete `.cargo` directory # to save disk space
run: rm -rf /home/runner/.cargo
if: runner.os == 'Linux'
- uses: actions/cache@v4
with:
path: |
~/.sbt
~/.coursier
key: ${{ runner.os }}-sbt-${{ hashfiles('**/build.sbt') }}
- name: sbt createDistribution
run: |
sbt createDistribution
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALAPY_PYTHON_LIBRARY: "python3.12"
- name: sbt publish
run: |
sbt publish
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCALAPY_PYTHON_LIBRARY: "python3.12"
- name: Install and test
run: |
npm install -g @appthreat/atom
python -m pip install --upgrade pip setuptools wheel
pip install poetry
sudo apt install -y graphviz-dev
poetry config virtualenvs.create false
poetry install --no-cache
- name: Release PyPI
if: startsWith(github.ref, 'refs/tags/')
run: |
poetry build --no-cache
- name: Release PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
- name: Build Anaconda
run: |
mkdir /tmp/conda-out
$CONDA/bin/conda update -n base -c defaults conda
$CONDA/bin/conda install anaconda-client conda-build conda-verify
$CONDA/bin/conda build -c conda-forge --no-anaconda-upload --output-folder /tmp/conda-out/ .
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
- name: Release Anaconda
if: startsWith(github.ref, 'refs/tags/')
run: |
$CONDA/bin/anaconda upload --label main -u appthreat /tmp/conda-out/noarch/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
continue-on-error: true
- run: sha512sum target/chen.zip > target/chen.zip.sha512
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
target/chen.zip
target/chen.zip.sha512