diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c28bea168..000000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: ruby -git: - depth: false -cache: bundler -before_install: -- bundle install -after_success: -- script/tag_on_master -script: bundle exec rake book:build -env: - secure: "O+YCTDgLfCYAJjjOv2sApDRV5NJe6pkhiYIkORFuf2flO8HE72fEtDRpSWh1vulnIH6AjRK2jH7C8qA3MVbUO8D0io+Ha+vnbMXIp1JPCptcJNEkJrW13VTR66SWOzsgLp3mCrIC+YdE2JoYWGcnDsRMQwdnrWnxBzSOd22ZKzU=" - -before_deploy: bundle install && bundle exec rake book:build -deploy: - provider: releases - file: - - progit.epub - - progit.mobi - - progit.pdf - - progit.html - skip_cleanup: true - on: - tags: true - api-key: - secure: "l3XdupX6dT48IoTieJXrd7Yx8+KhiR2QYrNrDzT6RKxA7UyXGSP/axsVerg7OjKfIHWZgDJRVzcc2RswE+Xjw9sOY8r2h2q9uCwj8G0EqtFbtgGK0La5LB0euh0tNJN8GLFj1OdSZGY7dWWK88GXeHCua2WSify0V79R4ClIM+s=" -branches: - only: - - master - - /^2\.1(\.\d+)+$/ - -notifications: - email: - on_success: never - on_failure: always diff --git a/Rakefile b/Rakefile index e9446dbc5..0b0fd661f 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,7 @@ namespace :book do end # Variables referenced for build - version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp + version_string = `git describe --tags`.chomp if version_string.empty? version_string = '0' end diff --git a/TRANSLATING.md b/TRANSLATING.md index bc25e3688..67985e4d5 100644 --- a/TRANSLATING.md +++ b/TRANSLATING.md @@ -72,22 +72,13 @@ On https://git-scm.com, the translations are divided into three categories. Once | Partial translations available in | up to chapter 6 has been translated. | | Full translation available in |the book is (almost) fully translated. | -## Continuous integration with Travis CI +## Continuous integration with GitHub Actions -Travis CI is a [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) service that integrates with GitHub. Travis CI is used to ensure that a pull-request doesn't break the build or compilation. Travis CI can also provide compiled versions of the book. +GitHub Actions is a [continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) service that integrates with GitHub. GitHub Actions is used to ensure that a pull-request doesn't break the build or compilation. GitHub Actions can also provide compiled versions of the book. -Setting up Travis CI requires administrative control over the repository. - -### Registering for Travis continuous integration - -1. Register a Travis account [here](https://travis-ci.org/). -1. Register your project in Travis. -Please refer to the [Travis documentation](https://docs.travis-ci.com/) for more information. - -### Setting up your repository for continuous integration - -Travis CI works by scanning your project's root directory for a file named `.travis.yml` and following the 'recipe' that it contains. The good news is: there's already a working `.travis.yml` file in the Pro Git 2 source [here](https://raw.githubusercontent.com/progit/progit2-pub/master/travis.yml). -Copy that file, and put it in your working directory. Commit the .yml file and push it to your translation repository; that should fire up a compilation and a check of the book's contents. +The configuration for GitHub Actions is contained in the `.github/workflows` directory, and if you bring in the `master` branch of the root repository you'll get them for free. +However, if you created your translation repo by _forking_ the root repo, there's an extra step you must complete (if you did not fork, you can skip this part). +GitHub assumes that forks will be used to contribute to the repo from which they were forked, so you'll have to visit the "Actions" tab on your forked repo, and click the "I understand my workflows" button to allow the actions to run. ## Setting up a publication chain for e-books diff --git a/script/tag_on_master b/script/tag_on_master deleted file mode 100755 index 6757a2997..000000000 --- a/script/tag_on_master +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# This is for running on Travis. It automatically tags any merge to Master as a release in the 2.1.x series. -if [[ $TRAVIS_PULL_REQUEST != 'false' || "$TRAVIS_BRANCH" != 'master' ]]; then - # Don't run on pull requests - echo 'This only runs on a merge to master.' - exit 0 -fi - -# Compute the next tag number -LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3) -PATCH=$(($LASTPATCH+1)) -echo $PATCH - -# Create a tag -curl -H "Authorization: token $GITHUB_KEY" \ - -X POST \ - -d "{\"ref\":\"refs/tags/2.1.$PATCH\", \"sha\":\"$TRAVIS_COMMIT\"}" \ - https://api.github.com/repos/progit/progit2/git/refs