Skip to content

ci: use commit hash for LizardByte actions (#12) #27

ci: use commit hash for LizardByte actions (#12)

ci: use commit hash for LizardByte actions (#12) #27

Workflow file for this run

---
name: CI
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
strategy:
fail-fast: false
matrix:
os:
- macos-11
- macos-12
- windows-2019
- windows-2022
- ubuntu-20.04
- ubuntu-22.04
python: ["2.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
id: python
uses: ./
with:
python-version: ${{ matrix.python }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements-dev.txt
- name: Test with pytest
id: test
env:
INPUT_PYTHON_VERSION: ${{ matrix.python }}
shell: bash
run: |
python -m pytest \
-rxXs \
--tb=native \
--verbose \
tests
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs:
- pytest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Action
id: setup-release
# dependabot cannot pick up our tags, so use the commit hash
uses: LizardByte/setup-release-action@38bc9762d673470bd6f78613ae88b6b62c6e282b
with:
fail_on_events_api_error: true
github_token: ${{ secrets.GH_BOT_TOKEN }}
- name: Create Release
id: action
# dependabot cannot pick up our tags, so use the commit hash
uses: LizardByte/create-release-action@cd331e8752cdc0b66d75ad41ada0c16cae7cdf73
with:
allowUpdates: false
artifacts: ''
body: ''
discussionCategory: announcements
generateReleaseNotes: true
name: ${{ steps.setup-release.outputs.release_tag }}
prerelease: ${{ steps.setup-release.outputs.publish_stable_release != 'true' }}
tag: ${{ steps.setup-release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}