Skip to content

Commit

Permalink
Test license guard
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Oct 9, 2023
1 parent e8f85a4 commit 0abf01a
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/other/licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# File format: see https://github.com/apache/skywalking-eyes/blob/main/test/testdata/.licenserc_language_config_test.yaml

header:
license:
spdx-id: MPL-2.0

paths:
- '**/*.rs'
- '**/*.gd'
- '**/*.sh'
- '**/*.md'
- '.github/**/*.yml'

paths-ignore:
- 'examples'

comment: on-failure

language:
GDScript:
extensions: ['.gd', '.sh']
comment_style_id: 'Hashtag'
Rust:
extensions: ['.rs']
comment_style_id: 'SlashAsterisk'
39 changes: 36 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

name: "Deploy to GitHub Pages"

on:
push:
branches: [master]
#branches: [master]

env:
# Use fixed versions for now, replace with 'latest' to auto-use latest
Expand All @@ -14,12 +18,13 @@ env:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
# contents: read
contents: write
pages: write
id-token: write

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -48,9 +53,37 @@ jobs:
run: mdbook build

- name: "Upload Pages artifact"
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v1
with:
path: book

- name: "Deploy to GitHub Pages"
if: github.ref == 'refs/heads/master'
uses: actions/deploy-pages@v2


license-guard:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: "Check license headers"
uses: apache/skywalking-eyes/[email protected]
with:
# log: debug # optional: set the log level. The default value is `info`.
config: .github/other/licenserc.yml
# token: # optional: the token that license eye uses when it needs to comment on the pull request.
# Set to empty ("") to disable commenting on pull request. The default value is ${{ github.token }}
# mode: # optional: Which mode License-Eye should be run in. Choices are `check` or `fix`. The default value is `check`.
# mode: check
mode: fix

- name: "Commit changes"
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author_name: 'Godot-Rust Automation'
author_email: '[email protected]'
message: 'Auto-apply license headers'
4 changes: 4 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

[book]
authors = ["The godot-rust developers"]
multilingual = false
Expand Down
6 changes: 6 additions & 0 deletions src/toolchain/compatibility.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Compatibility and stability

The gdext library supports all stable Godot releases starting from Godot 4.0.
Expand Down

0 comments on commit 0abf01a

Please sign in to comment.