Skip to content

extension: bump version to v0.0.16 #341

extension: bump version to v0.0.16

extension: bump version to v0.0.16 #341

Workflow file for this run

# Code generated internal/ci/ci_tool.cue; DO NOT EDIT.
name: TryBot
"on":
push:
tags:
- v*
branches:
- ci/test
- master
pull_request: {}
schedule:
- cron: 0 2 * * *
workflow_dispatch: {}
jobs:
test:
defaults:
run:
shell: bash --noprofile --norc -euo pipefail {0}
runs-on: namespace-profile-linux-amd64
if: |-
(contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"trybot"')) || ! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"'))
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Reset git directory modification times
run: touch -t 202211302355 $(find * -type d)
- name: Restore git file modification times
uses: chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
- id: DispatchTrailer
name: Try to extract Dispatch-Trailer
run: |-
x="$(git log -1 --pretty='%(trailers:key=Dispatch-Trailer,valueonly)')"
if [[ "$x" == "" ]]
then
# Some steps rely on the presence or otherwise of the Dispatch-Trailer.
# We know that we don't have a Dispatch-Trailer in this situation,
# hence we use the JSON value null in order to represent that state.
# This means that GitHub expressions can determine whether a Dispatch-Trailer
# is present or not by checking whether the fromJSON() result of the
# output from this step is the JSON value null or not.
x=null
fi
echo "value<<EOD" >> $GITHUB_OUTPUT
echo "$x" >> $GITHUB_OUTPUT
echo "EOD" >> $GITHUB_OUTPUT
- if: |-
((github.ref == 'refs/heads/master') && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) && (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"'))
name: Check we don't have Dispatch-Trailer on a protected branch
run: |-
echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
false
- name: Install Go
uses: actions/setup-go@v5
with:
cache: false
go-version: 1.25.1
- name: Set common go env vars
run: |-
go env -w GOTOOLCHAIN=local
case $(go env GOARCH) in
amd64) go env -w GOAMD64=v3 ;; # 2013 and later; makes `go test -race` 15% faster
arm64) go env -w GOARM64=v8.6 ;; # Apple M2 and later
esac
# Dump env for good measure
go env
- if: github.event_name != 'schedule' && matrix.runner != 'ns-windows-amd64'
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
path: |-
~/.npm
${{ github.workspace }}/extension/node_modules
- if: |-
github.repository == 'cue-lang/vscode-cue' && (((github.ref == 'refs/heads/master') && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
run: go env -w GOFLAGS=-count=1
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22.11.0
- name: Early git and code sanity checks
run: go run cuelang.org/go/internal/ci/[email protected]
- env:
CUE_TOKEN: ${{ secrets.NOTCUECKOO_CUE_TOKEN }}
run: go tool cue login --token=${CUE_TOKEN}
- name: Add node_modules/.bin to PATH and npm install
run: |-
echo "PATH=$PWD/node_modules/.bin:$PATH" >> $GITHUB_ENV
npm install
- name: Add node_modules/.bin to PATH and npm install
run: |-
echo "PATH=$PWD/node_modules/.bin:$PATH" >> $GITHUB_ENV
npm install
working-directory: extension
- name: Verify
run: go mod verify
- name: Generate
run: go generate ./...
- name: Test
run: go test ./...
- name: Race test
run: go test -race ./...
- env:
STATICCHECK_CACHE: /cache/staticcheck
run: go tool staticcheck ./...
- run: |-
go mod tidy -diff
go vet ./...
- name: Format
run: npm run format
working-directory: extension
- name: Compile extension
run: npm run compile
working-directory: extension
- name: Package extension
run: npm run package
working-directory: extension
- if: always()
name: Check that git is clean at the end of the job
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
- if: github.repository == 'cue-lang/vscode-cue' && (startsWith(github.ref, 'refs/tags/v'))
name: Check version match
run: go tool cue cmd -t tag=${GITHUB_REF##refs/tags/} checkReleaseVersion
working-directory: extension
- if: github.repository == 'cue-lang/vscode-cue' && (startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/ci/test'))
name: Publish extension to the OpenVSX registry
run: npm run publish:ovsx
env:
OVSX_PAT: ${{ secrets.CUECKOO_OVSX_PAT }}
working-directory: extension
- if: github.repository == 'cue-lang/vscode-cue' && (startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/ci/test'))
name: Publish extension to the Microsoft VSCode Marketplace
run: npm run publish:msft -- -p $VSCODE_PAT
env:
VSCODE_PAT: ${{ secrets.CUECKOO_VSCODE_PAT }}
working-directory: extension