ci: add a fake version of tag.yml workflow #1
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: Fake Application Release | ||
# This is a simplified copy of tag.yml, only there for testing during PR. | ||
# It does not create any release or upload any assets: publishing steps are replaced | ||
# by a call to `ls` showing which assets are available. | ||
on: | ||
pull_request: | ||
jobs: | ||
build_release_assets: | ||
uses: .github/workflows/build_release_assets.yml | ||
secrets: inherit | ||
push_to_pypi: | ||
needs: build_release_assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
- name: Download packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: packages | ||
- name: List downloaded artifacts | ||
run: | | ||
ls packages | ||
ls dist | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: build_release_assets | ||
continue-on-error: true | ||
# This is required for `gh release create` to work | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Read info | ||
id: tags | ||
shell: bash | ||
run: | | ||
echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | ||
- name: Download packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: packages | ||
- name: Download standalone binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: standalone-binaries-* | ||
path: standalone-binaries | ||
merge-multiple: true | ||
- name: List downloaded artifacts | ||
run: | | ||
ls \ | ||
packages/ggshield-*.pyz \ | ||
packages/ggshield_*.deb \ | ||
packages/ggshield-*.rpm \ | ||
standalone-binaries/ggshield-*.pkg | ||
push_to_cloudsmith: | ||
needs: build_release_assets | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Download packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: packages | ||
- name: Install Cloudsmith CLI | ||
run: pip install cloudsmith-cli | ||
- name: List downloaded artifacts | ||
run: | | ||
ls packages | ||
ls dist |