Bump actions/download-artifact from 3 to 4 #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build the browser and publish it to GitHub Packages | |
name: Build browser | |
on: push | |
jobs: | |
browser-jni: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Workspace | |
run: | | |
mkdir -p cef/Release | |
rm -rf java/org.eclipse.set.browser.cef.win32/res/cef | |
mkdir -p java/org.eclipse.set.browser.cef.win32/res/cef | |
mkdir -p java/org.eclipse.set.browser.lib/res | |
shell: bash | |
- name: Cache CEF | |
id: cef-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
java/org.eclipse.set.browser.cef.win32/res/cef | |
cef/Release/libcef.lib | |
cef/Release/LICENSE.txt | |
key: ${{ hashFiles('CEF_VERSION.txt') }} | |
- name: Download CEF | |
if: steps.cef-cache.outputs.cache-hit != 'true' | |
run: | | |
VERSION=$(grep -E -v ^# ../../CEF_VERSION.txt) | |
curl -o cef.tar.bz2 https://cef-builds.spotifycdn.com/$VERSION.tar.bz2 | |
tar xf cef.tar.bz2 $VERSION/LICENSE.txt $VERSION/Resources --strip-components 1 | |
tar xf cef.tar.bz2 $VERSION/Release/libcef.lib --strip-components 2 | |
tar xf cef.tar.bz2 --wildcards $VERSION/Release/*.dll --wildcards $VERSION/Release/*.bin --strip-components 2 | |
cp -r *.dll *.bin Resources/* LICENSE.txt ../../java/org.eclipse.set.browser.cef.win32/res/cef | |
ls -avl ../../java/org.eclipse.set.browser.cef.win32/res/cef | |
working-directory: cef/Release | |
shell: bash | |
- name: Build Rust | |
run: cargo clean && cargo build --release | |
working-directory: native | |
shell: bash | |
- name: Archive binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chromium-swt-libs | |
path: native/target/release/chromium_*.* | |
retention-days: 1 | |
build: | |
needs: | |
- browser-jni | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: eclipse-set/build/.github/actions/setup-java@main | |
- name: Set up Workspace | |
run: | | |
mkdir -p cef/Release | |
rm -rf java/org.eclipse.set.browser.cef.win32/res/cef | |
mkdir -p java/org.eclipse.set.browser.cef.win32/res/cef | |
mkdir -p java/org.eclipse.set.browser.lib/res | |
- name: Cache CEF | |
id: cef-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
java/org.eclipse.set.browser.cef.win32/res/cef | |
cef/Release/libcef.lib | |
cef/Release/LICENSE.txt | |
key: ${{ hashFiles('CEF_VERSION.txt') }} | |
- name: Download CEF | |
if: steps.cef-cache.outputs.cache-hit != 'true' | |
run: | | |
VERSION=$(grep -E -v ^# ../../CEF_VERSION.txt) | |
wget https://cef-builds.spotifycdn.com/$VERSION.tar.bz2 -O cef.tar.bz2 | |
tar xf cef.tar.bz2 $VERSION/LICENSE.txt $VERSION/Resources --strip-components 1 | |
tar xf cef.tar.bz2 $VERSION/Release/libcef.lib --strip-components 2 | |
tar xf cef.tar.bz2 --wildcards $VERSION/Release/*.dll --wildcards $VERSION/Release/*.bin --strip-components 2 | |
cp -r *.dll *.bin Resources/* LICENSE.txt ../../java/org.eclipse.set.browser.cef.win32/res/cef | |
ls -avl ../../java/org.eclipse.set.browser.cef.win32/res/cef | |
working-directory: cef/Release | |
- name: Fetch Rust binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: chromium-swt-libs | |
path: java/org.eclipse.set.browser.lib/res/ | |
- name: Build | |
run: mvn -T 1.5C -B clean verify | |
- name: Publish | |
run: mvn -T 1.5C -B deploy -DaltDeploymentRepository=set-github::https://maven.pkg.github.com/${{ github.repository }} | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Trigger SET | |
if: github.ref == 'refs/heads/main' && github.repository_owner == 'eclipse-set' | |
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2.1.2 | |
with: | |
token: ${{ secrets.GH_BOT_TOKEN }} | |
repository: eclipse-set/set | |
event-type: "Rebuild with browser update ${{ github.run_number }}" | |