The github actions were previously ran with Node 20, this bumps them to Node 22. README was also updated to reflect currently used version of Node.
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: "Create GitHub release"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# create release artefact before creating the release to get the correct release in the
|
|
# artefact name.
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 22
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Make dist
|
|
run: |
|
|
make dist
|
|
RELEASE_NO=$(echo ${{github.ref_name}} | tr -d 'v')
|
|
mv "cockpit-image-builder-$RELEASE_NO.tar.gz" ../cockpit-image-builder-$RELEASE_NO.tar.gz
|
|
|
|
# create release, which will bump the version
|
|
- name: Upstream release
|
|
uses: osbuild/release-action@main
|
|
with:
|
|
token: "${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }}"
|
|
slack_webhook_url: "${{ secrets.SLACK_WEBHOOK_URL }}"
|
|
|
|
# upload release artefact
|
|
# Source0 expands to `https://github.com/osbuild/image-builder-frontend/releases/download/v$VERSION/cockpit-image-builder-v$VERSION.tar.gz`,
|
|
# so the v needs to be in the tarball when we upload it as a release artefact.
|
|
- name: Upload release artefact
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
RELEASE_NO=$(echo ${{github.ref_name}} | tr -d 'v')
|
|
gh release upload ${{github.ref_name}} \
|
|
../cockpit-image-builder-$RELEASE_NO.tar.gz
|