fix: do not use deprecated prettym_print #76
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: Build, Release & Publish | |
on: push | |
jobs: | |
build: | |
name: Checkout & Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup haxe | |
uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: 4.2.5 | |
- uses: danielo515/stylua-action@1.0.1 | |
name: Setup stylua so we can run it on build | |
with: | |
token: ${{ secrets.github_token }} | |
version: 0.16.0 | |
- name: Run haxe tests | |
run: | | |
haxelib install --always libs.hxml | |
haxe test-macro.hxml | |
haxe tests.hxml | |
- name: Build | |
run: | | |
haxe build.hxml | |
- name: Clone neodev | |
uses: actions/checkout@v3 | |
with: | |
repository: folke/neodev.nvim.git | |
path: /home/runner/.config/.haxe/nvim-api | |
- name: Generate API | |
run: | | |
haxe build-api.hxml | |
- name: Run test that should fail | |
run: | | |
./run-fail-test.sh | |
- name: Ensure lua code output doesn't change | |
uses: tj-actions/verify-changed-files@v13 | |
id: changedfiles | |
with: | |
files: | | |
lua/danielo_nvim | |
- name: Fail if there are changed files (should not be the case) | |
if: steps.changedfiles.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.changedfiles.outputs.changed_files }}" | |
git --no-pager diff "${{ steps.changedfiles.outputs.changed_files }}" | |
exit 1 | |
release: | |
name: Check version & Create release | |
permissions: | |
contents: write # to create release commit | |
pull-requests: write # to create release PR | |
runs-on: ubuntu-latest | |
needs: build | |
outputs: | |
# expose release.outputs.released for the "publish" job | |
released: ${{ steps.release.outputs.release_created }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
command: manifest | |
publish: | |
name: Publish to Haxelib | |
runs-on: ubuntu-latest | |
needs: release | |
if: needs.release.outputs.released | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: 4.2.5 | |
- run: | | |
haxe -version | |
haxelib --debug submit . "$HAXELIB_PASSWORD" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HAXELIB_PASSWORD: ${{ secrets.HAXELIB_PASSWORD }} |