Skip to content
name: Compilação e Publicação FolderFlex
on:
push:
branches: ['master']
paths-ignore:
- 'README.md'
- 'social_preview.jpg'
- 'docs/**'
pull_request:
branches: ['master']
permissions:
contents: write
jobs:
build:
strategy:
matrix:
configuration: [Release]
runs-on: windows-latest
steps:
- name: Sincronizando Repositório
uses: actions/checkout@v4
- name: Configurando Ambiente .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restaurando as dependencies
run: dotnet restore FolderFlex.sln
- name: Compilando Tudo
run: dotnet build FolderFlex.sln --configuration ${{ matrix.configuration }} --no-restore
- name: Publicando FolderFlex
run: dotnet publish FolderFlex/FolderFlex.csproj --configuration ${{ matrix.configuration }} --output ./output/
- name: Publicando Updater
run: dotnet publish Updater/Updater.csproj --configuration ${{ matrix.configuration }} --output ./output/
- name: Compactando tudo em um zip
run: |
powershell Compress-Archive -Path ./output/* -DestinationPath ./output/FolderFlex.zip
- name: Criando uma tag para a versão
id: tag_version
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"
git tag v1.0.${{ github.run_number }}
git push origin v1.0.${{ github.run_number }}
- name: Criando a nova release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 5.0.${{ github.run_number }}
release_name: "FolderFlex v5.0.${{ github.run_number }}"
draft: false
prerelease: true
- name: Anexando o artefato à release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./output/FolderFlex.zip
asset_name: FolderFlex.zip
asset_content_type: application/zip