Skip to content

Commit

Permalink
Merge pull request #40 from fingerprintjs/use-reusable-workflows
Browse files Browse the repository at this point in the history
Use reusable workflows for release and report status
  • Loading branch information
ilfa authored Aug 29, 2023
2 parents 0dc224d + 0125388 commit 03f4000
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 44 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
PRIVATE_KEY: "${{ secrets.PRIVATE_KEY }}"
VISITOR_ID: "${{ secrets.VISITOR_ID }}"
REQUEST_ID: "${{ secrets.REQUEST_ID }}"
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@0d9c6ff1de9903da88d24c0564f6e83cb28faca9
with:
status: ${{ job.status }}
notification_title: 'Python SDK Functional Test has {status_message}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

report-status:
needs: functional_tests
if: always()
uses: fingerprintjs/dx-team-toolkit/.github/workflows/report-workflow-status.yml@v1
with:
notification_title: 'Python SDK Functional Test has {status_message}'
job_status: ${{ needs.functional_tests.result }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
51 changes: 15 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,22 @@
name: release

name: 'Release'
on:
push:
branches:
- main
- dev

jobs:
publish:
environment: production
name: Build and publish
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '11'
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
pip install twine
- name: Semantic Release
uses: cycjimmy/semantic-release-action@91ab76a4a393a8d0c4739e9aea1818b56bc953ea
with:
extra_plugins: |
@semantic-release/[email protected]
[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
release-server-sdk-python:
name: 'Publish new version'
uses: fingerprintjs/dx-team-toolkit/.github/workflows/release-server-sdk.yml@v1
with:
language: python
language-version: '3.9'
prepare-command: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install wheel
pip install twine
secrets:
GH_RELEASE_TOKEN: ${{ secrets.RELEASE_GH_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 03f4000

Please sign in to comment.