You've already forked tf2wikipricing
ci: create releases on tags, builds on push and PR
This commit is contained in:
46
.gitea/workflows/release.yaml
Normal file
46
.gitea/workflows/release.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: debian-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4.1.2
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install
|
||||||
|
- name: Build project
|
||||||
|
run: bun run build
|
||||||
|
- name: Archive production artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: tf2wikipricing.user.js
|
||||||
|
path: |
|
||||||
|
dist/userscript/tf2wikipricing.user.js
|
||||||
|
- name: Read package.json version
|
||||||
|
uses: tyankatsu0105/read-package-version-actions@v1
|
||||||
|
id: version
|
||||||
|
- name: Create release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
id: create_release
|
||||||
|
with:
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
release_name: ${{ steps.version.outputs.version }}
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
- name: Upload release artifacts
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: dist/userscript/tf2wikipricing.user.js
|
||||||
|
asset_name: tf2wikipricing.user.js
|
||||||
|
asset_content_type: text/javascript
|
||||||
Reference in New Issue
Block a user