From 51368502c2e72cc97072d11bb14d72a184f41148 Mon Sep 17 00:00:00 2001 From: oier Date: Sat, 26 Aug 2023 15:39:54 +0200 Subject: [PATCH] :package: Action start --- {.github => .gitea}/CODEOWNERS | 0 .gitea/workflows/prueba.yml | 19 ++++++++ .github/workflows/apidoc.yml | 56 ---------------------- .github/workflows/assetlib.yml | 20 -------- .github/workflows/fanout.yml | 71 ---------------------------- .github/workflows/prerelease.yml | 79 -------------------------------- 6 files changed, 19 insertions(+), 226 deletions(-) rename {.github => .gitea}/CODEOWNERS (100%) create mode 100644 .gitea/workflows/prueba.yml delete mode 100644 .github/workflows/apidoc.yml delete mode 100644 .github/workflows/assetlib.yml delete mode 100644 .github/workflows/fanout.yml delete mode 100644 .github/workflows/prerelease.yml diff --git a/.github/CODEOWNERS b/.gitea/CODEOWNERS similarity index 100% rename from .github/CODEOWNERS rename to .gitea/CODEOWNERS diff --git a/.gitea/workflows/prueba.yml b/.gitea/workflows/prueba.yml new file mode 100644 index 00000000..d67ac59b --- /dev/null +++ b/.gitea/workflows/prueba.yml @@ -0,0 +1,19 @@ +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" + - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file diff --git a/.github/workflows/apidoc.yml b/.github/workflows/apidoc.yml deleted file mode 100644 index 7b187675..00000000 --- a/.github/workflows/apidoc.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: "Update API docs" - -on: - push: - branches: - - "develop" - -concurrency: api-${{ github.ref }} - -jobs: - apidoc: - name: Update API docs - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - repository: godot-escoria/escoria-demo-game - ref: "develop" - path: game - - name: "Checkout docs repo" - uses: actions/checkout@v2 - with: - token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - repository: godot-escoria/escoria-docs - ref: "devel" - fetch-depth: 0 - path: docs - - name: Remove existing docs - run: | - mv docs/api/index.rst . - rm -rf docs/api/* - mv index.rst docs/api - - name: "Update docs" - uses: docker://gdquest/gdscript-docs-maker:1 - with: - entrypoint: "bash" - args: "-c \"BASEDIR=$(pwd) && cd /app && ./generate_reference $BASEDIR/game -o $BASEDIR/docs/api -d addons/escoria-core\"" - - name: "Update ESC reference" - run: | - apt update && apt install -y python3 python3-pip - pip3 install m2r2 - cd docs - python3 extractesc.py - git status - - name: "Commit" - uses: EndBug/add-and-commit@v7.2.1 - with: - add: '["api", "scripting/z_esc_reference.rst"]' - message: 'docs: Automatic update of API docs' - push: true - cwd: "docs" - branch: "devel" - - diff --git a/.github/workflows/assetlib.yml b/.github/workflows/assetlib.yml deleted file mode 100644 index 3b5d4757..00000000 --- a/.github/workflows/assetlib.yml +++ /dev/null @@ -1,20 +0,0 @@ -on: - release: - types: - - published -name: "Push to assetlib" - -jobs: - publish: - runs-on: ubuntu-latest - name: "Publish new version to asset lib" - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Godot Asset Lib - uses: deep-entertainment/godot-asset-lib-action@main - with: - username: escoria - password: ${{ secrets.ASSET_STORE_PASSWORD }} - assetId: 1080 - approveDirectly: "true" diff --git a/.github/workflows/fanout.yml b/.github/workflows/fanout.yml deleted file mode 100644 index d8f294e9..00000000 --- a/.github/workflows/fanout.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: "Fan out changes to distinct repositories" - -on: - push: - branches: - - "main" - - "develop" - -concurrency: fanout-${{ github.ref }} - -jobs: - fanout: - strategy: - matrix: - parts: - - dir: "addons/escoria-core" - repo: "godot-escoria/escoria-core" - - dir: "addons/escoria-ui-simplemouse" - repo: "godot-escoria/escoria-ui-simplemouse" - - dir: "addons/escoria-ui-9verbs" - repo: "godot-escoria/escoria-ui-9verbs" - - dir: "addons/escoria-core" - repo: "godot-escoria/escoria-game-template" - - dir: "addons/escoria-dialog-simple" - repo: "godot-escoria/escoria-dialog-simple" - name: "Fanout ${{ matrix.parts.dir }} to ${{ matrix.parts.repo }}" - runs-on: "ubuntu-20.04" - env: - DIR: "${{matrix.parts.dir}}" - REPO: "${{matrix.parts.repo}}" - steps: - - name: "Configure git" - run: | - if ! git --version | grep 2.33 >/dev/null - then - sudo add-apt-repository ppa:git-core/ppa -y - sudo apt-get update - sudo apt-get install git -y - fi - - name: "Checkout" - uses: "actions/checkout@v3" - with: - repository: "godot-escoria/escoria-demo-game" - ref: "develop" - path: "demo-game" - token: "${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }}" - fetch-depth: 0 - - name: "Filtering out ${{ env.DIR }}" - run: | - curl -s https://raw.githubusercontent.com/newren/git-filter-repo/main/git-filter-repo -o git-filter-repo - chmod +x git-filter-repo - cd demo-game - git remote -v - ../git-filter-repo --path $DIR --prune-empty auto --force - git clean -fd - git status - - name: "Checkout" - uses: "actions/checkout@v3" - with: - repository: "${{ env.REPO }}" - ref: "develop" - path: "target" - token: "${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }}" - fetch-depth: 0 - - name: "Apply changes" - run: | - cd target - git config --global user.email "contact@escoria-framework.org" - git config --global user.name "Escoria merge bot" - git pull ../demo-game develop --rebase - git push --force diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml deleted file mode 100644 index b9c7f338..00000000 --- a/.github/workflows/prerelease.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: "Release new prerelease version" - -on: - push: - branches: - - develop - -jobs: - prerelease: - if: "github.event.head_commit.message != 'chore: storing version and changelog'" - name: Preparing release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - - name: Remove trailing whitespace - run: | - OUTPUT=$(find . -name "*.gd" -type f | xargs sed -i 's/[[:space:]]$//') - RC=$? - if [[ $RC -ne 0 ]] && [[ $RC -ne 128 ]] - then - echo $OUTPUT - exit $RC - fi - exit 0 - - name: Calculate version - id: calculate_version - uses: mathieudutour/github-tag-action@v5.6 - with: - github_token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - dry_run: true - pre_release_branches: "develop" - append_to_pre_release_tag: "alpha" - default_bump: "release" - custom_release_rules: "fix:prerelease,feat:prerelease" - - name: "Write changelog" - if: "steps.calculate_version.outputs.changelog != ''" - run: | - CHANGELOG="" - if [ -e CHANGELOG.md ] - then - CHANGELOG=$(cat CHANGELOG.md) - fi - echo -e "${{steps.calculate_version.outputs.changelog}}\n\n${CHANGELOG}" > CHANGELOG.md - - name: "Commit" - if: "steps.calculate_version.outputs.changelog != ''" - uses: EndBug/add-and-commit@v7.2.1 - with: - message: "chore: storing version and changelog" - push: true - release: - if: "github.event.head_commit.message == 'chore: storing version and changelog'" - name: Release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - - name: Create version - id: create_version - uses: mathieudutour/github-tag-action@v5.6 - with: - github_token: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - dry_run: true - pre_release_branches: "develop" - append_to_pre_release_tag: "alpha" - default_bump: "release" - custom_release_rules: "fix:prerelease,feat:prerelease" - - name: Create a GitHub release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.ESCORIA_DEPLOYMENT_TOKEN }} - with: - tag_name: ${{ steps.create_version.outputs.new_tag }} - release_name: ${{ steps.create_version.outputs.new_tag }} - body: ${{ steps.create_version.outputs.changelog }}