-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Importador de acciones #321
Open
Malandro9493
wants to merge
1
commit into
github:main
Choose a base branch
from
Malandro9493:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
on: pull_request: push: branches: [main] tags: ["v*"] env: DOTNET_VERSION: "6.0.x" concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: install dotnet-format run: dotnet tool install -g dotnet-format --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json - name: lint working-directory: src run: dotnet format ActionsImporter.sln --verify-no-changes unit-test: runs-on: ubuntu-latest permissions: checks: write pull-requests: write steps: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v2 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: dotnet restore run: dotnet restore src/ActionsImporter.sln - name: dotnet build run: dotnet build src/ActionsImporter.sln - name: dotnet test run: dotnet test src/ActionsImporter.UnitTests/ActionsImporter.UnitTests.csproj --no-build --no-restore --logger "junit;LogFilePath=unit-tests.xml" - name: publish test results uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: files: "**/*-tests.xml" check_name: "Unit Test Results" build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: dotnet restore run: dotnet restore src/ActionsImporter.sln - name: dotnet build run: dotnet build src/ActionsImporter.sln - name: Validate licenses run: | dotnet tool install --global ThirdLicense thirdlicense --project src/ActionsImporter.sln --output .licenses/new-licenses.txt diff -u .licenses/new-licenses.txt .licenses/licenses.txt - name: dotnet publish run: | dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r win10-x64 --self-contained -o dist/win-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r osx-x64 --self-contained -o dist/osx-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r osx-arm64 --self-contained -o dist/osx-arm64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r linux-x64 --self-contained -o dist/linux-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true - name: prepare staging run: | mkdir -p ${{ runner.temp }}/staging cp dist/win-x64/gh-actions-importer.exe ${{ runner.temp }}/staging/actions-importer-windows-amd64.exe cp dist/osx-x64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-darwin-amd64 cp dist/osx-arm64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-darwin-arm64 cp dist/linux-x64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-linux-amd64 - name: publish artifacts uses: actions/upload-artifact@v3 with: name: executables path: ${{ runner.temp }}/staging/* publish: runs-on: ubuntu-latest needs: build if: startsWith(github.ref, 'refs/tags/v') environment: create_release steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: validate tag on main shell: pwsh run: | git checkout main $mainsha = $(git show-ref refs/heads/main --hash) $tagsha = $(git show-ref ${{ github.ref }} --hash) Write-Output "refs/heads/main: $mainsha" Write-Output "${{ github.ref }}: $tagsha" if ($mainsha -ne $tagsha) { Write-Error "tag must match HEAD of main" exit 1 } - name: download artifacts uses: actions/download-artifact@v3 with: name: executables path: ${{ runner.temp }}/dist - name: create release uses: softprops/action-gh-release@v1 with: draft: true generate_release_notes: true fail_on_unmatched_files: true files: | ${{ runner.temp }}/dist/actions-importer-windows-amd64.exe ${{ runner.temp }}/dist/actions-importer-linux-amd64 ${{ runner.temp }}/dist/actions-importer-darwin-arm64 ${{ runner.temp }}/dist/actions-importer-darwin-amd64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
on:
pull_request:
push:
branches: [main]
tags: ["v*"]
env:
DOTNET_VERSION: "6.0.x"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: install dotnet-format run: dotnet tool install -g dotnet-format --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json - name: lint working-directory: src run: dotnet format ActionsImporter.sln --verify-no-changes
unit-test:
runs-on: ubuntu-latest permissions: checks: write pull-requests: write steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: dotnet restore run: dotnet restore src/ActionsImporter.sln - name: dotnet build run: dotnet build src/ActionsImporter.sln - name: dotnet test run: dotnet test src/ActionsImporter.UnitTests/ActionsImporter.UnitTests.csproj --no-build --no-restore --logger "junit;LogFilePath=unit-tests.xml" - name: publish test results uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: files: "**/*-tests.xml" check_name: "Unit Test Results"
build:
runs-on: ubuntu-latest steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ env.DOTNET_VERSION }} - name: dotnet restore run: dotnet restore src/ActionsImporter.sln - name: dotnet build run: dotnet build src/ActionsImporter.sln - name: Validate licenses run: | dotnet tool install --global ThirdLicense thirdlicense --project src/ActionsImporter.sln --output .licenses/new-licenses.txt diff -u .licenses/new-licenses.txt .licenses/licenses.txt - name: dotnet publish run: | dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r win10-x64 --self-contained -o dist/win-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r osx-x64 --self-contained -o dist/osx-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r osx-arm64 --self-contained -o dist/osx-arm64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true dotnet publish src/ActionsImporter/ActionsImporter.csproj -c Release -r linux-x64 --self-contained -o dist/linux-x64 --no-restore -p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true - name: prepare staging run: | mkdir -p ${{ runner.temp }}/staging cp dist/win-x64/gh-actions-importer.exe ${{ runner.temp }}/staging/actions-importer-windows-amd64.exe cp dist/osx-x64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-darwin-amd64 cp dist/osx-arm64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-darwin-arm64 cp dist/linux-x64/gh-actions-importer ${{ runner.temp }}/staging/actions-importer-linux-amd64
publish:$mainsha = $ (git show-ref refs/heads/main --hash) $tagsha = $ (git show-ref ${{ github.ref }} --hash) Write-Output "refs/heads/main: $mainsha" Write-Output "$ {{ github.ref }}: $tagsha" if ($mainsha -ne $tagsha) { Write-Error "tag must match HEAD of main" exit 1 } - name: download artifacts uses: actions/download-artifact@v3 with: name: executables path: $ {{ runner.temp }}/dist - name: create release uses: softprops/action-gh-release@v1 with: draft: true generate_release_notes: true fail_on_unmatched_files: true files: | ${{ runner.temp }}/dist/actions-importer-windows-amd64.exe ${{ runner.temp }}/dist/actions-importer-linux-amd64 ${{ runner.temp }}/dist/actions-importer-darwin-arm64 ${{ runner.temp }}/dist/actions-importer-darwin-amd64
runs-on: ubuntu-latest needs: build if: startsWith(github.ref, 'refs/tags/v') environment: create_release steps:
- uses: actions/checkout@v2 with: fetch-depth: 0
- name: validate tag on main shell: pwsh run: | git checkout main
What's changing?
How's this tested?
Closes [related issues]