We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f39a6 commit ed473f6Copy full SHA for ed473f6
2 files changed
.github/workflows/PR.yml
@@ -0,0 +1,43 @@
1
+# This is a basic workflow to help you get started with Actions
2
+
3
+name: PR
4
5
+# Controls when the action will run.
6
+on:
7
+ # Triggers the workflow on push or pull request events but only for the master branch
8
+ pull_request:
9
+ branches: [ master ]
10
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch:
13
14
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15
+jobs:
16
+ # This workflow contains a single job called "build"
17
+ build:
18
+ # The type of runner that the job will run on
19
+ runs-on: ubuntu-latest
20
21
+ # Steps represent a sequence of tasks that will be executed as part of the job
22
+ steps:
23
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24
+ - uses: actions/checkout@v2
25
+ - name: Set up Ruby
26
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
27
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
28
+ # uses: ruby/setup-ruby@v1
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: 2.6
32
33
+ # Runs a single command using the runners shell
34
+ - name: before install
35
+ run: |
36
+ wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh
37
+ sh bootstrap.sh
38
+ bundle install
39
+ - name: build book
40
+ env:
41
+ GITHUB_VERSION: "v0.0.0"
42
43
+ bundle exec rake book:build_action
.github/workflows/release-on-merge.yml
@@ -0,0 +1,42 @@
+name: Release on push to main
+ push:
+ branches: [ main, master ]
+ release:
+ fetch-depth: 0
+ - name: get bootstrap file
+ run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh
+ - name: run bootstrap
+ run: sh bootstrap.sh
+ - name: Compute tag name
+ id: compute-tag
+ echo Computing next tag number
+ LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
+ PATCH=$(($LASTPATCH+1))
+ echo "::set-output name=tagname::2.1.${PATCH}"
+ echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
+ ruby-version: 2.7
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
+ - name: Build release assets
+ run: bundle exec rake book:build_action
+ - name: Create release
+ uses: ncipollo/release-action@v1
+ token: ${{ secrets.GITHUB_TOKEN }}
+ tag: ${{ steps.compute-tag.outputs.tagname }}
+ commit: ${{ steps.compute-tag.outputs.branch }}
+ artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html'
0 commit comments