Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): release action #616

Merged
merged 9 commits into from
Nov 4, 2023
Merged
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release

permissions:
contents: write

on:
workflow_dispatch:
inputs:
new_version:
description: New version number
required: true
type: string

jobs:
bump_version:
name: Bump Version
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Setup Node.js
SunsetTechuila marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/setup-node@v3
with:
node-version: 18
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump Package Version
run: npm version --no-git-tag-version ${{ github.event.inputs.new_version }}
- name: Commit Changes
run: |
git commit -am "chore: bump version to ${{ github.event.inputs.new_version }}"
git push origin HEAD

build_and_push:
name: Build and Push
needs: bump_version
uses: ./.github/workflows/push.yml

create_release:
name: Create Release
needs: build_and_push
runs-on: ubuntu-latest
steps:
- name: Download "dist" Branch
run: curl -s -o spicetify-marketplace.zip https://codeload.github.com/${{ github.repository }}/zip/refs/heads/dist
- name: Publish Release
uses: softprops/action-gh-release@master
with:
tag_name: ${{ github.event.inputs.new_version }}
generate_release_notes: true
files: spicetify-marketplace.zip