diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..012f560 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + if: github.repository_owner == 'voxpupuli' + steps: + - uses: actions/checkout@v2 + - name: Install Ruby 3.0 + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0' + - name: Build gem + run: gem build *.gemspec + - name: Publish gem to rubygems.org + run: gem push *.gem + env: + GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}' + - name: Setup GitHub packages access + run: | + mkdir -p ~/.gem + echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials + chmod 0600 ~/.gem/credentials + - name: Publish gem to GitHub packages + run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..73043cc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: Test + +on: + - pull_request + - push + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - "2.4" + - "2.5" + - "2.6" + - "2.7" + - "3.0" + puppet: + - "7" + - "6" + - "5" + exclude: + - puppet: "7" + ruby: "2.4" + - puppet: "6" + ruby: "3.0" + - puppet: "5" + ruby: "3.0" + - puppet: "5" + ruby: "2.7" + name: Ruby ${{ matrix.ruby }} + Puppet ${{ matrix.puppet }} + env: + PUPPET_VERSION: "~> ${{ matrix.puppet }}.0" + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Show Puppet version + run: bundle exec puppet --version + - name: Run tests + run: bundle exec rake + - name: Verify gem builds + run: gem build *.gemspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0385ef0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: false -rvm: - - '2.5' - - '2.4' - -notifications: - email: false -env: - - PUPPET_VERSION="~> 6.0" - - PUPPET_VERSION="~> 7.0" - - PUPPET_VERSION="~> 5.3.0" - - PUPPET_VERSION="~> 5.2.0" - - PUPPET_VERSION="~> 5.1.0" - - PUPPET_VERSION="~> 5.0.0" - -matrix: - exclude: - - rvm: '2.4' - env: PUPPET_VERSION="~> 7.0" - -before_script: - - puppet --version - -deploy: - provider: rubygems - api_key: - secure: cPOwxSifAyfPVz+VP5YNuWXwIiIWfc3BHXCsbFNyieznlMFLlkYO+ENjzl+3TqaA5bXngjTbMRYlWuZyf2/Cm/0LHMQYJlaaM8OI3XSmUdKbus6lA212Gpc1lcj2wIirRs+it34TJ+UnBMsmQY6Sc66MbnWcd3fBYshjDk5LAzYQ5SS5kREBx1xkl3S8zLQP+4D+Hqsu3WBBiTQ1hAWnnyqqWvurfmt0tJDLOU99rgPPhpfQ3kwyjxersKCE+QyVG41EBbkyxsW76qJL9xu7IHTQkb6VvUKmtluKxv7EBlzjc3bUWL6GbV7pMPzJ/RtQrsYgWUP0NdxirBorBgoNRdn/goATLHhGuCvubOsU75SOyHgLPs+yqvsMA6s1o89sVxHzL9ztrmmF375B6H3NHbNKjpbh3X31EK+E72anVT3X4SuIKX/VPHYIQY3mGLrkmASQLxcbcPMhKhm01aGY9ql0SnT6KsNkvIFLLDXoHo9S/0svd6shogb2BmPl/GQT5VWBTjVsBs5vD7hIC1K5bYhVa2YeHrAsryexNqQVck00LMhZZkkpWPR0kYfpdnmrNMVQDP622nxPoXhho9y8J9mwD9b3hYohjrtWa71vulZmGAlo1+mFdCuJp0eMCAeQH9u4li2islaWVGdsl7TLiaVENw8RaDcS2pbmPLDusU0= - on: - tags: true