Skip to content

Commit

Permalink
feat: new version 12
Browse files Browse the repository at this point in the history
  • Loading branch information
popovevgen committed Dec 19, 2023
1 parent ca40c92 commit 62b57f1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 28 deletions.
71 changes: 44 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,49 @@ on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

build-project:
name: Build Next.js project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Build Next.js application
run: npm run build

- name: Run semantic-release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifacts to GitHub Releases
uses: actions/upload-artifact@v4
with:
name: dist
path: .next
- name: Checkout code
uses: actions/checkout@v2
- name: Install NPM dependencies
run: npm install
- name: Build project assets
run: npm run build
- name: Upload site content
uses: actions/upload-artifact@v2
with:
name: site-build
path: .next/
distribute-project:
name: Distribute Next.js project to GitHub Releases
runs-on: ubuntu-latest
needs: build-project
steps:
- name: Download site content
uses: actions/download-artifact@v2
with:
name: site-build
- name: Archive site content
uses: thedoctor0/zip-release@master
with:
filename: site.zip
- name: Create GitHub release
id: create-new-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_number }}
release_name: Release ${{ github.run_number }}
- name: Upload asset to GitHub release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./site.zip
asset_name: site-v${{ github.run_number }}.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@12evgen/test-vercel",
"version": "1.48.0",
"version": "1.49.0",
"private": false,
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit 62b57f1

Please sign in to comment.