Skip to content

Commit

Permalink
devops: Create release-avx.yml
Browse files Browse the repository at this point in the history
create a new workflow to release avx package

Signed-off-by: XiaoPanAnsys <117445308+XiaoPanAnsys@users.noreply.github.com>
  • Loading branch information
XiaoPanAnsys committed Oct 23, 2024
1 parent 601e196 commit 1f3ed77
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release-avx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: release-avx

on:
push:
tags: ['v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?']
workflow_dispatch:

permissions:
contents: write

jobs:
build_foxe:
name: build_foxe
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Package
run: npm run package

- name: Extract version
id: extract_version
run: |
version=$(node -p "require('./package.json').version")
echo "version=$version" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ASAM AVX-OSI Converter ${{ env.version }}
draft: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: lichtblick.asam-avx-osi-converter-${{ env.version }}.foxe
asset_name: lichtblick.asam-avx-osi-converter-${{ env.version }}.foxe
asset_content_type: application/octet-stream

0 comments on commit 1f3ed77

Please sign in to comment.