chore: remove commented test workflow and fix resource_builder_test #23
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build binaries | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| goos: linux | |
| goarch: amd64 | |
| artifact_name: opencore-linux-amd64 | |
| - os: macos-latest | |
| goos: darwin | |
| goarch: amd64 | |
| artifact_name: opencore-darwin-amd64 | |
| - os: macos-latest | |
| goos: darwin | |
| goarch: arm64 | |
| artifact_name: opencore-darwin-arm64 | |
| - os: windows-latest | |
| goos: windows | |
| goarch: amd64 | |
| artifact_name: opencore-windows-amd64.exe | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.21" | |
| - name: Get dependencies | |
| run: go mod download | |
| - name: Build binary | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: 0 | |
| run: | | |
| go build -ldflags "-X main.version=${{ github.ref_name }}" -o ${{ matrix.artifact_name }} . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ${{ matrix.artifact_name }} | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release | |
| find ./artifacts -type f -exec cp {} ./release/ \; | |
| ls -lah ./release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2.5.0 | |
| with: | |
| files: ./release/* | |
| draft: false | |
| prerelease: false | |
| body_path: RELEASE.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-npm: | |
| name: Publish to NPM | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Update package version | |
| working-directory: ./npm | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| npm version $VERSION --no-git-tag-version --allow-same-version | |
| - name: Publish to NPM | |
| working-directory: ./npm | |
| run: npm publish --access public |