diff --git a/libs/template/.github/workflows/makecode-release.yml b/libs/template/.github/workflows/makecode-release.yml index 63802b925c3..6ddc257dca5 100644 --- a/libs/template/.github/workflows/makecode-release.yml +++ b/libs/template/.github/workflows/makecode-release.yml @@ -1,33 +1,33 @@ name: MakeCode Arcade Release -on: +on: release: types: - created jobs: build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [8.x] + permissions: + contents: write # Required for gh release upload steps: - - uses: actions/checkout@v1 - - name: install node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v5 + - name: install node.js 22 + uses: actions/setup-node@v6 with: - node-version: ${{ matrix.node-version }} + node-version: 22 + - name: install makecode run: | npm install -g pxt pxt target arcade + - name: build js run: | pxt clean pxt install pxt build --cloud + - name: build D51 continue-on-error: true run: | @@ -35,6 +35,7 @@ jobs: pxt install --hw samd51 pxt build --hw samd51 --cloud cp ./built/binary.uf2 binary-d51.uf2 + - name: build F4 continue-on-error: true run: | @@ -42,6 +43,7 @@ jobs: pxt install --hw stm32f401 pxt build --hw stm32f401 --cloud cp ./built/binary.uf2 binary-f4.uf2 + - name: build P0 continue-on-error: true run: | @@ -49,15 +51,19 @@ jobs: pxt install --hw rpi pxt build --hw rpi --cloud cp ./built/binary.uf2 binary-p0.uf2 + - name: bundle all run: | - cat binary-*.uf2 > built/arcade.uf2 - - name: upload bundled - uses: actions/upload-release-asset@v1.0.1 + cat binary-*.uf2 > ./built/arcade.uf2 + + - name: Upload Release Assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./built/arcade.uf2 - asset_name: arcade.uf2 - asset_content_type: application/octet-stream \ No newline at end of file + run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + gh release upload $TAG_NAME \ + built/arcade.uf2 \ + binary-d51.uf2 \ + binary-f4.uf2 \ + binary-p0.uf2 \ + --clobber \ No newline at end of file