feat: InstructionTextLine also add address and raw instruction data (… #24
This file contains hidden or 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
| name: build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| VERSION_MAJOR: 0 | |
| VERSION_MINOR: 1 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: generate version | |
| id: version | |
| shell: bash | |
| run: | | |
| BUILD_NUMBER=0 | |
| REVISION=${{ github.run_number }} | |
| VERSION="${{ env.VERSION_MAJOR }}.${{ env.VERSION_MINOR }}.${BUILD_NUMBER}.${REVISION}" | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "build=${BUILD_NUMBER}" >> $GITHUB_OUTPUT | |
| echo "revision=${REVISION}" >> $GITHUB_OUTPUT | |
| echo "Generated version: ${VERSION}" | |
| echo " - Build: ${BUILD_NUMBER}" | |
| echo " - Revision (Run Number): ${REVISION}" | |
| - name: setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: pack | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "[+] Packing NuGet package" | |
| dotnet pack --configuration Release -o artifacts -p:PublishDir=artifacts /p:Version=${{ steps.version.outputs.version }} /p:FileVersion=${{ steps.version.outputs.version }} /p:AssemblyVersion=${{ steps.version.outputs.version }} /p:ProductVersion=${{ steps.version.outputs.version }} | |
| - name: create release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| continue-on-error: true | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }} | |
| name: release v${{ steps.version.outputs.version }} | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: true | |
| files: artifacts/** | |
| - name: publish to NuGet | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| continue-on-error: true | |
| env: | |
| NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} | |
| run: | | |
| if [[ -z "${NUGET_AUTH_TOKEN}" ]]; then | |
| echo "[!] NUGET_TOKEN not exists , skip."; exit 0 | |
| fi | |
| echo "[+] Publishing NuGet packages with version ${{ steps.version.outputs.version }}" | |
| shopt -s globstar nullglob | |
| for pkg in artifacts/**/*.nupkg; do | |
| if [[ "$pkg" == *.snupkg ]]; then | |
| continue | |
| fi | |
| echo "-> dotnet nuget push $pkg" | |
| dotnet nuget push "$pkg" \ | |
| --api-key "$NUGET_AUTH_TOKEN" \ | |
| --source "https://api.nuget.org/v3/index.json" \ | |
| --skip-duplicate | |
| done | |