mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-05-17 10:25:08 +00:00
ci: improve release process
This commit is contained in:
committed by
Romain Lespinasse
parent
08cd74e0fa
commit
81beb28f90
@@ -1,43 +1,21 @@
|
||||
name: Build
|
||||
name: Build OS-Dependent
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3.x
|
||||
pull_request:
|
||||
branches:
|
||||
- v3.x
|
||||
|
||||
jobs:
|
||||
build:
|
||||
use-on-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
npm ci
|
||||
- run: |
|
||||
npm run all
|
||||
- uses: cycjimmy/semantic-release-action@v2
|
||||
with:
|
||||
semantic_version: 17.3.4
|
||||
branches: |
|
||||
[
|
||||
'v2.x',
|
||||
'v3.x'
|
||||
]
|
||||
extra_plugins: |
|
||||
@semantic-release/changelog@5.0.1
|
||||
@semantic-release/git@9.0.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
os-test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run all
|
||||
- uses: ./
|
||||
- name: Output
|
||||
run: |
|
||||
@@ -82,10 +60,64 @@ jobs:
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG_URL_CS }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG_URL_CS }}"
|
||||
|
||||
win-test:
|
||||
use-on-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run all
|
||||
- uses: ./
|
||||
- name: Output
|
||||
run: |
|
||||
echo "Partial variables"
|
||||
echo " repository owner : ${{ env.GITHUB_REPOSITORY_OWNER_PART }}"
|
||||
echo " repository name : ${{ env.GITHUB_REPOSITORY_NAME_PART }}"
|
||||
echo "Slug variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG }}"
|
||||
echo " repository owner : ${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG }}"
|
||||
echo " repository name : ${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG }}"
|
||||
echo "Slug URL variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG_URL }}"
|
||||
echo " repository owner : ${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG_URL }}"
|
||||
echo " repository name : ${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_URL }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG_URL }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG_URL }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG_URL }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG_URL }}"
|
||||
echo "Short SHA variables"
|
||||
echo " sha : ${{ env.GITHUB_SHA_SHORT }}"
|
||||
echo " pull request sha : ${{ env.GITHUB_EVENT_PULL_REQUEST_HEAD_SHA_SHORT }}"
|
||||
- name: Case Sensitive Output
|
||||
run: |
|
||||
echo "Slug variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG_CS }}"
|
||||
echo " repository owner : ${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG_CS }}"
|
||||
echo " repository name : ${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_CS }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG_CS }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG_CS }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG_CS }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG_CS }}"
|
||||
echo "Slug URL variables"
|
||||
echo " repository : ${{ env.GITHUB_REPOSITORY_SLUG_URL_CS }}"
|
||||
echo " repository owner : ${{ env.GITHUB_REPOSITORY_OWNER_PART_SLUG_URL_CS }}"
|
||||
echo " repository name : ${{ env.GITHUB_REPOSITORY_NAME_PART_SLUG_URL_CS }}"
|
||||
echo " ref : ${{ env.GITHUB_REF_SLUG_URL_CS }}"
|
||||
echo " head ref : ${{ env.GITHUB_HEAD_REF_SLUG_URL_CS }}"
|
||||
echo " base ref : ${{ env.GITHUB_BASE_REF_SLUG_URL_CS }}"
|
||||
echo " event ref : ${{ env.GITHUB_EVENT_REF_SLUG_URL_CS }}"
|
||||
|
||||
use-on-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run all
|
||||
- uses: ./
|
||||
- name: Output
|
||||
run: |
|
||||
38
.github/workflows/codeql-analysis.yml
vendored
38
.github/workflows/codeql-analysis.yml
vendored
@@ -1,34 +1,28 @@
|
||||
name: "CodeQL"
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ v3.x, v*.x ]
|
||||
branches:
|
||||
- v3.x
|
||||
pull_request:
|
||||
branches: [ v3.x ]
|
||||
branches:
|
||||
- v3.x
|
||||
schedule:
|
||||
- cron: '0 6 * * 1'
|
||||
- cron: "0 6 * * 1"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
analyse:
|
||||
name: analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
|
||||
language: ["javascript"]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- uses: github/codeql-action/autobuild@v1
|
||||
- uses: github/codeql-action/analyze@v1
|
||||
|
||||
10
.github/workflows/linter.yml
vendored
10
.github/workflows/linter.yml
vendored
@@ -5,6 +5,8 @@ on:
|
||||
branches:
|
||||
- v3.x
|
||||
pull_request:
|
||||
branches:
|
||||
- v3.x
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -12,13 +14,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter@v3
|
||||
- uses: github/super-linter@v3
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: false
|
||||
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||
|
||||
25
.github/workflows/release-dryrun.yml
vendored
Normal file
25
.github/workflows/release-dryrun.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Release DryRun
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- v*.x
|
||||
|
||||
jobs:
|
||||
release-dryrun:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run all
|
||||
- uses: ./
|
||||
- uses: cycjimmy/semantic-release-action@v2
|
||||
with:
|
||||
branches: |
|
||||
[
|
||||
"${{ env.GITHUB_REF_SLUG }}"
|
||||
]
|
||||
dry_run: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
18
.github/workflows/release.yml
vendored
Normal file
18
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v*.x
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: technote-space/auto-cancel-redundant-workflow@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: npm run all
|
||||
- uses: cycjimmy/semantic-release-action@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
17
README.md
17
README.md
@@ -1,7 +1,10 @@
|
||||
# GitHub Slug action
|
||||
|
||||
[![Actions Status][1]][2]
|
||||
![GitHub Super-Linter][13]
|
||||
[![Release][release]][actions]
|
||||
[![Linux Usage][linux-use]][actions]
|
||||
[![MacOS Usage][macos-use]][actions]
|
||||
[![Windows][windows-use]][actions]
|
||||
![Lint][lint]
|
||||
[![Public workflows that use this action.][8]][9]
|
||||
[![Licence][11]][12]
|
||||
|
||||
@@ -166,8 +169,13 @@ Please, use the current branch `v3.x` or a version tag (see [releases pages][6])
|
||||
- [Github Actions : enfin des pipelines accessibles aux développeurs][16] (in french :fr:)
|
||||
- The next one is you. _Don't hesitate to add you to this list._
|
||||
|
||||
[1]: https://github.com/rlespinasse/github-slug-action/workflows/Build/badge.svg
|
||||
[2]: https://github.com/rlespinasse/github-slug-action/actions
|
||||
[actions]: https://github.com/rlespinasse/github-slug-action/actions
|
||||
[release]: https://github.com/rlespinasse/github-slug-action/workflows/Release/badge.svg
|
||||
[linux-use]: https://github.com/rlespinasse/github-slug-action/workflows/Use%20on%20Linux/badge.svg
|
||||
[macos-use]: https://github.com/rlespinasse/github-slug-action/workflows/Use%20on%20MacOS/badge.svg
|
||||
[windows-use]: https://github.com/rlespinasse/github-slug-action/workflows/Use%20on%20Windows/badge.svg
|
||||
[lint]: https://github.com/rlespinasse/github-slug-action/workflows/Lint/badge.svg
|
||||
|
||||
[3]: https://github.com/rlespinasse/github-slug-action/tree/v3.x/examples
|
||||
[4]: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads
|
||||
[5]: https://github.com/rlespinasse/github-slug-action/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=
|
||||
@@ -178,7 +186,6 @@ Please, use the current branch `v3.x` or a version tag (see [releases pages][6])
|
||||
[10]: https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables
|
||||
[11]: https://img.shields.io/github/license/rlespinasse/github-slug-action
|
||||
[12]: https://github.com/rlespinasse/github-slug-action/blob/v3.x/LICENSE
|
||||
[13]: https://github.com/rlespinasse/github-slug-action/workflows/Lint/badge.svg
|
||||
[14]: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot
|
||||
[15]: https://esensconsulting.medium.com/mettre-en-place-une-ci-cd-angular-avec-github-actions-netlify-ca0b59b99ed8
|
||||
[16]: https://www.youtube.com/watch?v=RHnTJBwcE98
|
||||
|
||||
16223
package-lock.json
generated
16223
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -30,10 +30,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^5.0.1",
|
||||
"@semantic-release/exec": "^5.0.0",
|
||||
"@semantic-release/git": "^9.0.0",
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/node": "^14.14.21",
|
||||
"@typescript-eslint/parser": "^3.9.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
||||
"@vercel/ncc": "^0.23.0",
|
||||
"eslint": "^7.18.0",
|
||||
"eslint-plugin-github": "^4.1.1",
|
||||
@@ -46,12 +47,21 @@
|
||||
"ts-jest": "^26.4.4",
|
||||
"typescript": "^3.9.7"
|
||||
},
|
||||
"files": [
|
||||
"/dist"
|
||||
],
|
||||
"release": {
|
||||
"tagFormat": "${version}",
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "git add dist"
|
||||
}
|
||||
],
|
||||
"@semantic-release/git",
|
||||
"@semantic-release/github"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user