Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Build and Test

on: push

permissions: read-all
permissions:
contents: read


# update in build.yml and codeql.yml at same time
env:
Expand All @@ -19,9 +21,11 @@ jobs:

steps:

- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false

- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version: 24
Expand All @@ -42,7 +46,7 @@ jobs:

- run: npm run build

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: js
path: |
Expand Down Expand Up @@ -83,14 +87,16 @@ jobs:


steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false

- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
if: ${{ !env.ACT }}
with:
name: js

- uses: bazel-contrib/setup-bazel@0.19.0
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -104,7 +110,7 @@ jobs:
# need to copy to output directory as `bazel-bin` is a symlink and cannot be read by the actions/upload-artifact action
- run: cp bazel-bin/protobuf-javascript-* out/

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: release-${{ matrix.os }}-${{ matrix.cpu }}
path: out
8 changes: 5 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand Down Expand Up @@ -81,4 +83,4 @@ jobs:
- run: npm test

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
type: string
jobs:
publish:
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.2.3
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@1a42c3dca6566cf3a07689768259f1a35066ed01 # v0.2.3
with:
draft: false
tag_name: ${{ inputs.tag_name }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ on:
tags:
- "v*.*.*"
permissions:
id-token: write
attestations: write
contents: write
contents: read

jobs:
release:
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7.2.3
permissions:
id-token: write
attestations: write
contents: write
uses: bazel-contrib/.github/.github/workflows/release_ruleset.yaml@a841d62420f41a87a601fb331f3c2c2cc088506e # v7.2.3
with:
bazel_test_command: "bazel build //:bcr_dist_tar"
prerelease: false
release_files: "bazel-bin/protobuf-javascript-*.tar.gz"
tag_name: ${{ inputs.tag_name || github.ref_name }}
secrets: inherit
publish:
needs: release
permissions:
id-token: write
attestations: write
contents: write
uses: ./.github/workflows/publish.yaml
with:
tag_name: ${{ inputs.tag_name || github.ref_name }}
Expand Down
Loading