Skip to content

Commit

Permalink
ci: add a fake version of tag.yml workflow
Browse files Browse the repository at this point in the history
This fake version of the tag.yml workflow is used to verify as much as
possible that the changes in tag.yml are going to work as expected.
  • Loading branch information
agateau-gg committed Apr 10, 2024
1 parent 75975fe commit 1dc2e2e
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/faketag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
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

0 comments on commit 1dc2e2e

Please sign in to comment.