ci(updater): Add autoupdater capability #226
Workflow file for this run
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
branches: | |
- main | |
- feature/* | |
- fix/* | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Generate a token | |
id: generate_token | |
uses: tibdex/github-app-token@v2 | |
with: | |
app_id: ${{ secrets.APP_ID_ADMIN_GITHUB }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY_ADMIN_GITHUB }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Verify Conventional Commits | |
uses: amannn/action-semantic-pull-request@v5 | |
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up NodeJS | |
if: github.ref == 'refs/heads/main' # especificar rama principal | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Set up Semantic Release | |
if: github.ref == 'refs/heads/main' # especificar rama principal | |
run: npm -g install @semantic-release/git [email protected] | |
- name: Semantic Release | |
if: github.ref == 'refs/heads/main' # especificar rama principal | |
run: npx [email protected] | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} # debe crear un Personal Access Token | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build generateMergedReport | |
- name: copy the reportTest to codeCoverage | |
run: cp build/reports/jacoco/generateMergedReport/generateMergedReport.xml jacoco.xml || echo "Code coverage failed" | |
- name: Run sonar | |
if: github.event.pull_request.head.repo.fork == false | |
run: ./gradlew sonar --stacktrace | |
-Dsonar.login=${{ secrets.SONAR_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |