mirror of
https://github.com/rlespinasse/github-slug-action.git
synced 2026-05-17 10:25:08 +00:00
build: use semantic-release
This commit is contained in:
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -1,17 +1,16 @@
|
||||
name: ci
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Tests
|
||||
uses: ./.github/actions/bats
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ./.github/actions/bats
|
||||
- uses: cycjimmy/semantic-release-action@v2
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
@semantic-release/changelog
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules/
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Romain Lespinasse
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
7
Makefile
7
Makefile
@@ -1,7 +0,0 @@
|
||||
.PHONY: help tests
|
||||
|
||||
help: ## print this message
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
tests: ## Run tests locally
|
||||
docker run -w /workdir -v $(shell pwd):/workdir dduportal/bats:latest ./tests
|
||||
@@ -20,10 +20,10 @@ This action slug and expose some github variables.
|
||||
## Example usage
|
||||
|
||||
```yaml
|
||||
- uses: rlespinasse/github-slug-action@1.0.1
|
||||
- uses: rlespinasse/github-slug-action@master
|
||||
- name: Print slug variables
|
||||
run: |
|
||||
echo ${{ env.GITHUB_REF_SLUG }}
|
||||
echo ${{ env.GITHUB_HEAD_REF_SLUG }}
|
||||
echo ${{ env.GITHUB_BASE_REF_SLUG }}
|
||||
```
|
||||
```
|
||||
|
||||
6261
package-lock.json
generated
Normal file
6261
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "github-slug-action",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "docker run -w /workdir -v $(pwd):/workdir dduportal/bats:latest ./tests",
|
||||
"release": "semantic-release"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/rlespinasse/github-slug-action.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@semantic-release/changelog": "^3.0.5",
|
||||
"@semantic-release/git": "^7.0.18",
|
||||
"semantic-release": "^15.13.30"
|
||||
},
|
||||
"release": {
|
||||
"tagFormat": "${version}",
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"@semantic-release/git",
|
||||
"@semantic-release/github"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user