Skip to content

Commit

Permalink
chore: upgrade release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jellyton255 committed Sep 30, 2024
1 parent 74c3333 commit eba4e5c
Showing 1 changed file with 81 additions and 81 deletions.
162 changes: 81 additions & 81 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: "release-action"

on:
push:
tags:
- "v*"
push:
tags:
- "v*"

jobs:
release-action:
name: "Create Release"
runs-on: "ubuntu-latest"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}
release-action:
name: "Create Release"
runs-on: "ubuntu-latest"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}

- name: Install ZIP
run: sudo apt install zip
- name: Install ZIP
run: sudo apt install zip

- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 8.1.1
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.1.1

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "pnpm"
cache-dependency-path: "web/pnpm-lock.yaml"
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: "pnpm"
cache-dependency-path: "web/pnpm-lock.yaml"

- name: Create .npmrc
run: |
echo "@fortawesome:registry=https://npm.fontawesome.com/" > .npmrc
echo "//npm.fontawesome.com/:_authToken=${{ secrets.FONT_AWESOME_PRO_TOKEN }}" >> .npmrc
working-directory: web
- name: Create .npmrc
run: |
echo "@fortawesome:registry=https://npm.fontawesome.com/" > .npmrc
echo "//npm.fontawesome.com/:_authToken=${{ secrets.FONT_AWESOME_PRO_TOKEN }}" >> .npmrc
working-directory: web

- name: Install dependencies
run: pnpm i --frozen-lockfile
working-directory: web
- name: Install dependencies
run: pnpm i --frozen-lockfile
working-directory: web

- name: Run build
run: pnpm build
working-directory: web
env:
CI: false
FONT_AWESOME_PRO_TOKEN: ${{ secrets.FONT_AWESOME_PRO_TOKEN }}
- name: Run build
run: pnpm build
working-directory: web
env:
CI: false
FONT_AWESOME_PRO_TOKEN: ${{ secrets.FONT_AWESOME_PRO_TOKEN }}

- name: Bump manifest version
run: node .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}
- name: Bump manifest version
run: node .github/actions/bump-manifest-version.js
env:
TGT_RELEASE_VERSION: ${{ github.ref_name }}

- name: Push manifest change
uses: EndBug/add-and-commit@v8
with:
add: fxmanifest.lua
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "chore: bump manifest version to ${{ github.ref_name }}"
- name: Push manifest change
uses: EndBug/add-and-commit@v9
with:
add: fxmanifest.lua
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: "chore: bump manifest version to ${{ github.ref_name }}"

- name: Update tag ref
uses: EndBug/latest-tag@latest
with:
tag-name: ${{ github.ref_name }}
- name: Update tag ref
uses: EndBug/latest-tag@latest
with:
tag-name: ${{ github.ref_name }}

- name: Remove .npmrc file
run: rm -f .npmrc
working-directory: web
- name: Remove .npmrc file
run: rm -f .npmrc
working-directory: web

- name: Bundle files
run: |
cd web
mkdir ../temp-build
mv build ../temp-build/
rm -rf *
mv ../temp-build/build .
rmdir ../temp-build
cd ..
rm -rf ./.github ./.vscode ./.git
zip -r ${{ github.event.repository.name }}.zip . -x "*.git*"
- name: Bundle files
run: |
cd web
mkdir ../temp-build
mv build ../temp-build/
rm -rf *
mv ../temp-build/build .
rmdir ../temp-build
cd ..
rm -rf ./.github ./.vscode ./.git
zip -r ${{ github.event.repository.name }}.zip . -x "*.git*"
- name: Get App Token
uses: actions/create-github-app-token@v1
id: generate_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Get App Token
uses: actions/create-github-app-token@v1
id: generate_token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
title: ${{ github.ref_name }}
repo_token: "${{ steps.generate_token.outputs.token }}"
prerelease: false
files: ${{ github.event.repository.name }}.zip
- name: Create Release
uses: marvinpinto/action-automatic-releases@latest
with:
title: ${{ github.ref_name }}
repo_token: "${{ steps.generate_token.outputs.token }}"
prerelease: false
files: ${{ github.event.repository.name }}.zip

0 comments on commit eba4e5c

Please sign in to comment.