Skip to content

Create Zipapp and Release #8

Create Zipapp and Release

Create Zipapp and Release #8

Workflow file for this run

name: Create Zipapp and Release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install shiv
- name: Get version
id: get_version
run: echo "VERSION=$(cat cloudsmith_cli/data/VERSION)" >> $GITHUB_ENV
- name: Create Zipapp
run: shiv -o cloudsmith-${{ env.VERSION }}.pyz -c cloudsmith .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cloudsmith-${{ env.VERSION }}.pyz
asset_name: cloudsmith-${{ env.VERSION }}.pyz
asset_content_type: application/zip