Skip to content

Update release workflow to build and upload artifacts #1

Update release workflow to build and upload artifacts

Update release workflow to build and upload artifacts #1

Workflow file for this run

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
name: Create Release
jobs:
release:
name: Build release artifacts and create a release
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create zip archive
run: |
git archive --format=zip --prefix=neon-lords/ -o neon-lords.zip ${{ github.ref }}
- name: Create release draft
uses: actions/create-release@1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: false
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Upload system.json
uses: actions/upload-release-asset@v1
id: upload-release-asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./system.json
asset_name: system.json
asset_content_type: application/json
- name: Upload neon-lords.zip
uses: actions/upload-release-asset@v1
id: upload-release-asset

Check failure on line 40 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Create Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 40, Col: 13): The identifier 'upload-release-asset' may not be used more than once within the same scope.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./neon-lords.zip
asset_name: neon-lords.zip
asset_content_type: application/zip