Skip to content

WIP of packaging rework to new LS #1

WIP of packaging rework to new LS

WIP of packaging rework to new LS #1

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: build-and-test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:
permissions: {}
jobs:
build-and-test:
name: Build and Test (OS ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] #, windows-latest] # https://github.com/coactions/setup-xvfb/issues/18
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Time for BUILD_ID
id: time
uses: nanzm/get-time-action@v2.0
with:
format: "YYYYMMDD_HHmm"
- name: Get Branch name for BUILD_LABEL
id: branch_name
shell: bash
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: |
${{ runner.os }}-m2
# - name: Cache IntelliJ Aspects
# uses: actions/cache@v3
# with:
# path: ./bundles/com.salesforce.bazel.sdk/aspects
# key: ${{ runner.os }}-aspects-${{ hashFiles('**/aspects/import/import-and-build.sh', '**/aspects/import/WORKSPACE') }}
- name: Cache Bazel repository cache
uses: actions/cache@v3
with:
path: |
~/.cache/bazel
~/.cache/bazelisk
key: ${{ runner.os }}-bazel
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- name: Print Maven toolchains.xml
shell: bash
run: cat ~/.m2/toolchains.xml
- name: Setup Node version
uses: actions/setup-node@v1
with:
node-version: 16
- name: 📦 Install dependencies
run: npm install #yarn install --frozen-lockfile
publish:
needs: [build]
if: ${{ success() && contains(github.ref, 'main') }}
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v2
with:
path: ./bazel-vscode-0.0.5.vsix
key: ${{ env.cache-name }}-${{ github.run_id }}
- name: Create tag
if: contains(github.ref, 'main')
id: create_tag
run: |
tag=builds-$(date +%Y%m%d-%H%M%S)
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Create Release
if: contains(github.ref, 'main')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
release_name: ${{ steps.create_tag.outputs.tag }}
draft: true
prerelease: false
- name: Upload Artifact
if: contains(github.ref, 'main')
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bazel-vscode-0.0.5.vsix
asset_name: bazel-vscode-0.0.5.vsix
asset_content_type: application/octet-stream
- name: Publish Release
if: contains(github.ref, 'main')
uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}