mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 00:08:55 +00:00
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/setup-node/releases">actions/setup-node's releases</a>.</em></p> <blockquote> <h2>v7.0.0</h2> <h2>What's Changed</h2> <h3>Enhancements:</h3> <ul> <li>Add cache-primary-key and cache-matched-key as outputs by <a href="https://github.com/gowridurgad"><code>@gowridurgad</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1577">actions/setup-node#1577</a></li> <li>Migrate to ESM and upgrade dependencies by <a href="https://github.com/gowridurgad"><code>@gowridurgad</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1574">actions/setup-node#1574</a></li> </ul> <h3>Bug fixes:</h3> <ul> <li>Remove dummy NODE_AUTH_TOKEN export by <a href="https://github.com/gowridurgad"><code>@gowridurgad</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1558">actions/setup-node#1558</a></li> <li>Only use <code>mirrorToken</code> in <code>getManifest</code> if it's provided by <a href="https://github.com/deiga"><code>@deiga</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1548">actions/setup-node#1548</a></li> </ul> <h3>Documentation updates:</h3> <ul> <li>Add documentation for publishing to npm with Trusted Publisher (OIDC) by <a href="https://github.com/chiranjib-swain"><code>@chiranjib-swain</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1536">actions/setup-node#1536</a></li> <li>docs: Update restore-only cache documentation by <a href="https://github.com/priya-kinthali"><code>@priya-kinthali</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1550">actions/setup-node#1550</a></li> <li>docs: Update caching recommendations to mitigate cache poisoning risks by <a href="https://github.com/chiranjib-swain"><code>@chiranjib-swain</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1567">actions/setup-node#1567</a></li> </ul> <h3>Dependency update:</h3> <ul> <li>Upgrade <code>@actions/cache</code> to 5.1.0, log cache write denied by <a href="https://github.com/jasongin"><code>@jasongin</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1569">actions/setup-node#1569</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/chiranjib-swain"><code>@chiranjib-swain</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1536">actions/setup-node#1536</a></li> <li><a href="https://github.com/deiga"><code>@deiga</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1548">actions/setup-node#1548</a></li> <li><a href="https://github.com/jasongin"><code>@jasongin</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1569">actions/setup-node#1569</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v6...v7.0.0">https://github.com/actions/setup-node/compare/v6...v7.0.0</a></p> <h2>v6.5.0</h2> <h2>What's Changed</h2> <ul> <li>Update <code>@actions/cache</code> to 5.1.0 and add security overrides for undici and fast-xml-parser by <a href="https://github.com/HarithaVattikuti"><code>@HarithaVattikuti</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1579">actions/setup-node#1579</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v6.4.0...v6.5.0">https://github.com/actions/setup-node/compare/v6.4.0...v6.5.0</a></p> <h2>v6.4.0</h2> <h2>What's Changed</h2> <h3>Dependency updates:</h3> <ul> <li>Upgrade <a href="https://github.com/actions"><code>@actions</code></a> dependencies by <a href="https://github.com/Copilot"><code>@Copilot</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1525">actions/setup-node#1525</a></li> <li>Update Node.js versions in versions.yml and bump package to v6.4.0 by <a href="https://github.com/priya-kinthali"><code>@priya-kinthali</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1533">actions/setup-node#1533</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Copilot"><code>@Copilot</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-node/pull/1525">actions/setup-node#1525</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-node/compare/v6...v6.4.0">https://github.com/actions/setup-node/compare/v6...v6.4.0</a></p> <h2>v6.3.0</h2> <h2>What's Changed</h2> <h3>Enhancements:</h3> <ul> <li>Support parsing <code>devEngines</code> field by <a href="https://github.com/susnux"><code>@susnux</code></a> in <a href="https://redirect.github.com/actions/setup-node/pull/1283">actions/setup-node#1283</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/setup-node/commit/820762786026740c76f36085b0efc47a31fe5020"><code>8207627</code></a> Migrate to ESM and upgrade dependencies (<a href="https://redirect.github.com/actions/setup-node/issues/1574">#1574</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/04be95cf3511ea51ebf9f224ddfb99cc7ab87cd4"><code>04be95c</code></a> Add cache-primary-key and cache-matched-key as outputs (<a href="https://redirect.github.com/actions/setup-node/issues/1577">#1577</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/7c2c68d20d402ed6a201ada70a81341941093140"><code>7c2c68d</code></a> docs: Update caching recommendations to mitigate cache poisoning risks (<a href="https://redirect.github.com/actions/setup-node/issues/1567">#1567</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/6a61c0375d66246de94630495909f12cf8dac84d"><code>6a61c03</code></a> Merge pull request <a href="https://redirect.github.com/actions/setup-node/issues/1569">#1569</a> from jasongin/update-actions-cache-5.1.0</li> <li><a href="https://github.com/actions/setup-node/commit/30eb73b41ded577900c1ebf968ef95cdf8f7434f"><code>30eb73b</code></a> Resolve high-severity audit issues</li> <li><a href="https://github.com/actions/setup-node/commit/4e1a87a501d0302f99e30e2748568adcb388d09f"><code>4e1a87a</code></a> Update dist</li> <li><a href="https://github.com/actions/setup-node/commit/360237f0c01778d0c17291f75c56d6feae4f7574"><code>360237f</code></a> Strict equality</li> <li><a href="https://github.com/actions/setup-node/commit/4f8aac5beb2f0854bc79651567a18c67eb0b9de3"><code>4f8aac5</code></a> Bump <code>@actions/cache</code> to 5.1.0, log cache write denied</li> <li><a href="https://github.com/actions/setup-node/commit/f4a67bbeca970f103397d3d2b9462cf787cd2980"><code>f4a67bb</code></a> Only use <code>mirrorToken</code> in <code>getManifest</code> if it's provided (<a href="https://redirect.github.com/actions/setup-node/issues/1548">#1548</a>)</li> <li><a href="https://github.com/actions/setup-node/commit/0355742c943ddb13ca8a6b700f824231caa91e75"><code>0355742</code></a> Remove dummy NODE_AUTH_TOKEN export (<a href="https://redirect.github.com/actions/setup-node/issues/1558">#1558</a>)</li> <li>Additional commits viewable in <a href="https://github.com/actions/setup-node/compare/v4...v7">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
286 lines
11 KiB
YAML
286 lines
11 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
name: Release
|
|
env:
|
|
RUST_TOOLCHAIN: nightly-2026-05-20
|
|
jobs:
|
|
build:
|
|
name: Build binary
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: x86_64-unknown-linux-gnu
|
|
os: ubicloud-standard-8
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-linux-amd64
|
|
file_ext: .tar.gz
|
|
- arch: x86_64-unknown-linux-gnu
|
|
os: ubicloud-standard-8
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-linux-amd64-simd
|
|
file_ext: .tar.gz
|
|
- arch: x86_64-unknown-linux-musl
|
|
os: ubicloud-standard-8
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-linux-amd64-musl
|
|
file_ext: .tar.gz
|
|
- arch: aarch64-unknown-linux-musl
|
|
os: ubicloud-standard-16-arm
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-linux-arm64-musl
|
|
file_ext: .tar.gz
|
|
- arch: aarch64-unknown-linux-gnu
|
|
os: ubicloud-standard-16-arm
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-linux-arm64
|
|
file_ext: .tar.gz
|
|
- arch: x86_64-apple-darwin
|
|
os: macos-latest
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-darwin-amd64
|
|
file_ext: .tar.gz
|
|
- arch: aarch64-apple-darwin
|
|
os: macos-latest
|
|
features: "--features mimalloc"
|
|
file_name: openobserve-${{ github.ref_name }}-darwin-arm64
|
|
file_ext: .tar.gz
|
|
- arch: x86_64-pc-windows-msvc
|
|
os: windows-2022-16-cores
|
|
features: ""
|
|
file_name: openobserve-${{ github.ref_name }}-windows-amd64
|
|
file_ext: .zip
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: 24
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- name: Build UI
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=8192"
|
|
run: |
|
|
cd web/
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Install Protoc for linux
|
|
if: contains(matrix.arch, 'x86_64-unknown-linux')
|
|
run: | # Make sure the protoc is >= 3.15
|
|
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
|
|
unzip protoc-21.12-linux-x86_64.zip -d protoc
|
|
sudo cp protoc/bin/protoc /usr/local/bin/
|
|
sudo cp -r protoc/include/google /usr/local/include/
|
|
|
|
- name: Install Protoc for linux ARM
|
|
if: contains(matrix.arch, 'aarch64-unknown-linux')
|
|
run: | # Make sure the protoc is >= 3.15
|
|
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-aarch_64.zip
|
|
unzip protoc-21.12-linux-aarch_64.zip -d protoc
|
|
sudo cp protoc/bin/protoc /usr/local/bin/
|
|
sudo cp -r protoc/include/google /usr/local/include/
|
|
|
|
- name: Install Protoc for windows
|
|
if: contains(matrix.arch, 'windows')
|
|
shell: bash
|
|
run: |
|
|
curl -L -o protoc-21.12-win64.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip
|
|
unzip protoc-21.12-win64.zip -d protoc
|
|
cp protoc/bin/protoc.exe C:/windows/system32/protoc.exe
|
|
cp -r protoc/include/google C:/windows/system32/
|
|
|
|
- name: Install Protoc for macos
|
|
if: contains(matrix.arch, 'darwin')
|
|
run: |
|
|
brew install protobuf coreutils boost
|
|
|
|
- name: Install dependencies for linux
|
|
if: contains(matrix.arch, 'linux')
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt-get -y install libssl-dev pkg-config gcc g++ g++-aarch64-linux-gnu gcc-aarch64-linux-gnu musl-dev musl-tools
|
|
|
|
- name: Setup musl toolchain for linux musl
|
|
if: contains(matrix.arch, 'linux-musl')
|
|
run: |
|
|
sudo ln -sf "$(which g++)" /usr/bin/musl-g++
|
|
sudo ln -sf "$(which g++)" /usr/bin/aarch64-linux-musl-g++
|
|
|
|
- name: Install rust toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
targets: ${{ matrix.arch }}
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
prefix-key: release-${{ matrix.arch }}
|
|
|
|
- name: Output package versions
|
|
run: protoc --version ; cargo version ; rustc --version ; gcc --version ; g++ --version
|
|
|
|
- name: Print rustc cfg
|
|
run: rustc -C target-cpu=native --print cfg
|
|
|
|
- name: Run cargo build (standard)
|
|
if: contains(matrix.file_name, '-simd') == false
|
|
run: cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}
|
|
|
|
- name: Run cargo build (SIMD)
|
|
if: contains(matrix.file_name, '-simd')
|
|
run: RUSTFLAGS='-C target-feature=+aes,+avx,+avx2,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+avx512f,+avx512cd,+avx512bw,+avx512dq,+avx512vl' cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}
|
|
|
|
- name: Calculate checksum and rename binary
|
|
if: contains(matrix.arch, 'windows') == false
|
|
shell: bash
|
|
run: |
|
|
cd target/${{ matrix.arch }}/release-prod
|
|
chmod +x openobserve
|
|
tar -zcvf ${{ matrix.file_name }}.tar.gz openobserve
|
|
echo $(shasum -a 256 ${{ matrix.file_name }}.tar.gz | cut -f1 -d' ') > ${{ matrix.file_name }}.tar.gz.sha256sum
|
|
|
|
- name: Calculate checksum and rename binary for windows
|
|
if: contains(matrix.arch, 'windows')
|
|
shell: bash
|
|
run: |
|
|
cd target/${{ matrix.arch }}/release-prod
|
|
7z a -tzip ${{ matrix.file_name }}.zip openobserve.exe
|
|
certutil.exe -hashfile ${{ matrix.file_name }}.zip sha256|head -n 2|tail -n 1 > ${{ matrix.file_name }}.zip.sha256sum
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.file_name }}
|
|
path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}
|
|
|
|
- name: Upload checksum of artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.file_name }}.sha256sum
|
|
path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum
|
|
release:
|
|
name: Release artifacts
|
|
needs: [build]
|
|
runs-on: eks-openobserve-standard-4
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v5
|
|
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
role-to-assume: arn:aws:iam::325553860333:role/github-actions-s3-uploader
|
|
role-session-name: GithubActionsSession
|
|
aws-region: us-east-2
|
|
|
|
- name: Upload to S3
|
|
env:
|
|
BUCKET: ${{ vars.AWS_S3_BUCKET_NAME }}
|
|
run: |
|
|
if ! command -v aws &> /dev/null; then
|
|
echo "AWS CLI not found. Installing..."
|
|
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
|
unzip awscliv2.zip
|
|
sudo ./aws/install
|
|
else
|
|
echo "AWS CLI already installed."
|
|
fi
|
|
|
|
echo "Uploading artifacts to S3..."
|
|
for file in $(find . -type f \( -name "openobserve*.tar.gz" -o -name "*.zip" -o -name "openobserve*.sha256sum" \)); do
|
|
echo "Uploading $file to s3://${BUCKET}/releases/openobserve/${GITHUB_REF_NAME}/"
|
|
aws s3 cp "$file" "s3://${BUCKET}/releases/openobserve/${GITHUB_REF_NAME}/$(basename "$file")"
|
|
done
|
|
|
|
- name: Generate release body with Download Url
|
|
id: generate-body
|
|
run: |
|
|
echo "📦 Download Binaries from https://openobserve.ai/downloads" > release_body.md
|
|
echo "body<<EOF" >> $GITHUB_OUTPUT
|
|
cat release_body.md >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Publish release
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
name: "Release ${{ github.ref_name }}"
|
|
generate_release_notes: true
|
|
body: ${{ steps.generate-body.outputs.body }}
|
|
|
|
- name: Send release notification to Strapi
|
|
uses: actions/github-script@v9
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
script: |
|
|
// Get release info from workflow dispatch inputs
|
|
const tag = context.ref.replace("refs/tags/", "");
|
|
const { data: release } = await github.rest.repos.getReleaseByTag({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
tag: tag
|
|
});
|
|
function cleanChangelog(changelog) {
|
|
if (!changelog) return '';
|
|
const lines = changelog.split(/\r?\n/);
|
|
const result = [];
|
|
for (const line of lines) {
|
|
if (line.toLowerCase().includes('new contributors')) break;
|
|
if (line.toLowerCase().includes('full changelog')) continue;
|
|
if (line.toLowerCase().includes('download binaries from')) continue;
|
|
const cleanedLine = line.replace(/by\s+@[\w-]+.*$/i, '').replace(/@\w+/g, '').replace(/\bhttps?:\/\/\S+/gi, '').trim();
|
|
if (cleanedLine.length > 0) result.push(cleanedLine);
|
|
}
|
|
return result.join('\n');
|
|
}
|
|
|
|
const cleanedBody = cleanChangelog(release.body);
|
|
const payload = {
|
|
version: release.tag_name,
|
|
release_name: release.name,
|
|
release_url: release.html_url,
|
|
changelog: cleanedBody || 'No release notes provided',
|
|
type: 'PUBLIC',
|
|
date: release.published_at
|
|
};
|
|
try {
|
|
const response = await fetch(`${process.env.STRAPI_WEBHOOK_URL}/api/github-releases?status=published`, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Authorization': `Bearer ${process.env.STRAPI_API_TOKEN}`,
|
|
'Content-Type': 'application/json'
|
|
},
|
|
body: JSON.stringify({data: payload})
|
|
});
|
|
|
|
if (!response.ok) {
|
|
throw new Error(`Webhook request failed: ${response.status} ${response.statusText}`);
|
|
}
|
|
|
|
console.log('Response status:', response.status);
|
|
} catch (error) {
|
|
console.error('Failed to send webhook notification:', error);
|
|
core.setFailed(error.message);
|
|
}
|
|
env:
|
|
STRAPI_WEBHOOK_URL: ${{ secrets.STRAPI_WEBHOOK_URL }}
|
|
STRAPI_API_TOKEN: ${{ secrets.STRAPI_API_TOKEN }}
|