Update packages. Python crypto tagging improvements (#71) #56
Workflow file for this run
This file contains 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: release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
release: | |
if: github.repository_owner == 'appthreat' | |
concurrency: release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: 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' | |
- 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.11' | |
- 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') }} | |
- run: | | |
sbt createDistribution publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SCALAPY_PYTHON_LIBRARY: "python3.11" | |
- 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 publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD | |
$CONDA/bin/conda update -n base -c defaults conda | |
$CONDA/bin/conda install anaconda-client conda-build | |
$CONDA/bin/conda build -c conda-forge --output-folder ./conda-out/ . | |
anaconda upload --label main -u appthreat ./conda-out/noarch/*.tar.bz2 | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
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 |