feat: update policy #2
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: Releases | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PYTHON_VERSION: 3.9 | |
NODE_VERSION: 16 | |
jobs: | |
labeler: | |
name: Update labels | |
runs-on: self-hosted | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Run Labeler | |
uses: crazy-max/[email protected] | |
continuous-integration: | |
name: Continuous Integration | |
uses: "./.github/workflows/continuous_integration.yml" | |
secrets: inherit | |
tests: | |
name: Tests | |
uses: "./.github/workflows/tests.yml" | |
secrets: inherit | |
release: | |
name: Release | |
runs-on: self-hosted | |
needs: [continuous-integration, tests] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Setup Git | |
env: | |
PAT: ${{ secrets.PAT }} | |
run: | | |
git config user.name "emma-simbot-bot" | |
git config user.email "[email protected]" | |
git config --global url."https://${PAT}@github.com/".insteadOf "https://github.com/" | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Setup Node ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Load npm cache | |
uses: actions/cache@v3 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install semantic release | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
run: | | |
npm install --no-save @bjoluc/semantic-release-config-poetry | |
npx semantic-release |