Skip to content

Commit

Permalink
Add check for supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Electron committed Oct 13, 2023
1 parent 41b8596 commit c09c9b0
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,32 @@ on:
release:
types: [published]

env:
GH_TOKEN: ${{ github.token }}

permissions:
actions: 'write'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get release language
id: get_release_language
run: |
if [[ ${{ github.ref }} == *"python"* ]]; then
echo LANGUAGE="python" >> $GITHUB_OUTPUT
fi
if [[ ${{ github.ref }} == *"nodejs"* ]]; then
echo LANGUAGE="nodejs" >> $GITHUB_OUTPUT
fi
- name: Check if release language is supported
if: steps.get_release_language.outputs.LANGUAGE != 'python' && steps.get_release_language.outputs.LANGUAGE != 'nodejs'
run: gh run cancel ${{ github.run_id }}

- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
Expand All @@ -27,19 +47,6 @@ jobs:
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Echo tag
run: echo ${{ github.ref }}

- name: Get release language
id: get_release_language
run: |
if [[ ${{ github.ref }} == *"python"* ]]; then
echo LANGUAGE="python" >> $GITHUB_OUTPUT
fi
if [[ ${{ github.ref }} == *"nodejs"* ]]; then
echo LANGUAGE="nodejs" >> $GITHUB_OUTPUT
fi
- name: Get release version
id: get_release_version
run: |
Expand Down

0 comments on commit c09c9b0

Please sign in to comment.