Skip to content

Commit

Permalink
update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsJacobsen committed Feb 5, 2024
1 parent 33f389f commit cae9d05
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 1,243 deletions.
26 changes: 0 additions & 26 deletions .github/dependabot.yml

This file was deleted.

83 changes: 0 additions & 83 deletions .github/linters/.eslintrc.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .github/linters/.markdown-lint.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/linters/.yaml-lint.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/linters/tsconfig.json

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/check-dist.yml

This file was deleted.

81 changes: 33 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,47 @@
name: Continuous Integration
name: Release Workflow

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

jobs:
test-typescript:
name: TypeScript Tests
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies
id: npm-ci
run: npm ci

- name: Check Format
id: npm-format-check
run: npm run format:check

- name: Lint
id: npm-lint
run: npm run lint

- name: Test
id: npm-ci-test
run: npm run ci-test

test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
id: test-action
uses: ./
node-version: '14'

- name: Get version from commit message
id: version
run: echo "::set-output name=version::$(git log -1 --pretty=%B | grep -oP 'v \K\d+\.\d+\.\d+')"

- name: Update package.json
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"${{ steps.version.outputs.version }}\"/" package.json
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add package.json
git commit -m "Bump version to ${{ steps.version.outputs.version }}"
- name: Push changes
uses: ad-m/[email protected]
with:
milliseconds: 2000
branch: ${{ github.ref }}

- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: 'dist/*'
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Release ${{ steps.version.outputs.version }}
48 changes: 0 additions & 48 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/linter.yml

This file was deleted.

Loading

0 comments on commit cae9d05

Please sign in to comment.