Skip to content

ci: clean up script #2995

ci: clean up script

ci: clean up script #2995

Workflow file for this run

name: .NET
on:
push:
branches: [dev, master, beta]
pull_request:
branches: [dev, master, beta]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NODEJS: lts/*
jobs:
changes:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-changes
cancel-in-progress: true
runs-on: ubuntu-latest
outputs:
ci: ${{ steps.filter.outputs.ci }}
sound-switch: ${{ steps.filter.outputs.sound-switch }}
node: ${{ steps.filter.outputs.node }}
translations: ${{ steps.filter.outputs.translations }}
translation-files: ${{ steps.filter.outputs.translations_files }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
list-files: shell
filters: |
ci:
- '.github/**/*.yml'
sound-switch:
- 'SoundSwitch*/**'
node:
- 'package.json'
- 'package-lock.json'
translations:
- 'SoundSwitch/**/*.resx'
validate-translations:
needs: changes
if: needs.changes.outputs.translations == 'true'
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Validate the string of translation (brackets)
shell: pwsh
run: python tools\check_brackets.py ${{ needs.changes.outputs.translation-files }}
build:
needs: changes
if: github.ref != 'refs/heads/dev' && (needs.changes.outputs.sound-switch == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/master')
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build
cancel-in-progress: true
uses: ./.github/workflows/reusable-build.yml
with:
configuration: Release
secrets: inherit
release-dry-run:
needs: changes
if: github.ref != 'refs/heads/dev' && needs.changes.outputs.node == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6.3.0
with:
node-version: ${{ env.NODEJS }}
- name: Cache node modules
uses: actions/cache@v5
env:
cache-name: cache-node-modules
with:
path: npm-cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install semantic-release dependencies
run: npm ci --prefer-offline --silent --cache npm-cache
- name: Release dry run
run: npx semantic-release -d