Skip to content

Change upload release action #7

Change upload release action

Change upload release action #7

Workflow file for this run

# This workflow will release the Eclipse repository on GitHub when a new tag is pushed
name: Release on GitHub
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Install npm dependencies
working-directory: org.eclipse.xsmp.vscode_extension
run: npm install -g @vscode/vsce
- name: Package VS Code Extension
working-directory: org.eclipse.xsmp.vscode_extension
run: |
npm version ${{ github.ref_name }} --allow-same-version
npm install
vsce package --out "target/xsmp-modeler.vsix"
- name: Create release
id: create_release
uses: cyrilvrousos-tas/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
This release contains XSMP modeler ${{ github.ref_name }}
To install XSMP Modeler in Eclipse, add or update the XSMP [software site](https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-127.htm) with URL:
`jar:https://github.com/ThalesGroup/xsmp-modeler-core/releases/download/${{ github.ref_name }}/org.eclipse.xsmp.repository-${{ github.ref_name }}.zip!/`
To install XSMP in Visual Studio Code, download this [extension](https://github.com/ThalesGroup/xsmp-modeler-core/releases/download/${{ github.ref_name }}/xsmp-modeler-${{ github.ref_name }}.vsix) and follow these [instructions](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix).
You can find additional Command Line utilities in the Assets.
draft: true
prerelease: false
- name: Upload P2 repository
uses: cyrilvrousos-tas/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/org.eclipse.xsmp.repository/target/org.eclipse.xsmp.repository.zip
asset_name: org.eclipse.xsmp.repository-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: Upload VSCode extension
uses: cyrilvrousos-tas/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/org.eclipse.xsmp.vscode_extension/target/xsmp-modeler.vsix
asset_name: xsmp-modeler-${{ github.ref_name }}.vsix
asset_content_type: application/zip
- name: Upload SMP Tools CLI
uses: cyrilvrousos-tas/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/org.eclipse.xsmp.tool.smp.cli/target/org.eclipse.xsmp.tool.smp.cli.jar
asset_name: org.eclipse.xsmp.tool.smp.cli-${{ github.ref_name }}.jar
asset_content_type: application/java-archive
- name: Upload XSMP SDK Profile CLI
uses: cyrilvrousos-tas/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/org.eclipse.xsmp.profile.xsmp_sdk.cli/target/org.eclipse.xsmp.profile.xsmp_sdk.cli.jar
asset_name: org.eclipse.xsmp.profile.xsmp_sdk.cli-${{ github.ref_name }}.jar
asset_content_type: application/java-archive
- name: Upload ESA CDK Profile CLI
uses: cyrilvrousos-tas/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/org.eclipse.xsmp.profile.esa_cdk.cli/target/org.eclipse.xsmp.profile.esa_cdk.cli.jar
asset_name: org.eclipse.xsmp.profile.esa_cdk.cli-${{ github.ref_name }}.jar
asset_content_type: application/java-archive
- name: Publish release
uses: StuYarrow/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}