-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Releases | ||
|
||
on: | ||
push: | ||
tags: | ||
- .* | ||
|
||
jobs: | ||
release: | ||
name: Release new version | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Wait for tests | ||
uses: fountainhead/[email protected] | ||
id: wait-for-tests | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: Run dialyzer | ||
ref: ${{ github.ref }} | ||
timeoutSeconds: 3600 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-elixir@v1 | ||
with: | ||
otp-version: "22.2" | ||
elixir-version: "1.9.4" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache deps | ||
id: cache-deps | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: deps-${{ runner.os }}-${{ hashFiles('**/mix.lock') }}-git-${{ github.sha }} | ||
restore-keys: | | ||
deps-${{ runner.os }}-${{ hashFiles('**/mix.lock') }} | ||
deps-${{ runner.os }}-$ | ||
- name: Install package dependencies | ||
run: mix deps.get | ||
|
||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Publish hex package | ||
run: mix hex.publish --yes | ||
env: | ||
HEX_API_KEY: ${{ secrets.HEX_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Daily list sync | ||
|
||
on: | ||
schedule: | ||
- cron: "30 15 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Elixir | ||
uses: erlef/setup-elixir@v1 | ||
with: | ||
otp-version: "22.2" | ||
elixir-version: "1.9.4" | ||
|
||
- name: Download new list | ||
run: curl https://raw.githubusercontent.com/wesbos/burner-email-providers/master/emails.txt -o priv/burner-email-providers/emails.txt | ||
|
||
- name: Check for list changes | ||
continue-on-error: true | ||
id: changes | ||
run: git update-index --refresh && git diff-index HEAD | ||
|
||
- name: Commit changes | ||
if: steps.changes.outcome != 'success' | ||
run: | | ||
git checkout main -- | ||
git config user.email "[email protected]" | ||
git config user.name "Benjamin Piouffle" | ||
git add README.md | ||
git add priv/burner-email-providers/emails.txt | ||
git commit -m "chore: updated domain list" | ||
- name: Bump version | ||
if: steps.changes.outcome != 'success' | ||
run: | | ||
CURRENT_TAG=`git describe --tags --abbrev=0` | ||
NEW_PATCH=`echo $CURRENT_TAG | sed -E 's/v[0-9]+\.[0-9]+\.([0-9]+)/\1+1/' | bc` | ||
NEW_TAG=`echo $CURRENT_TAG | sed -E "s/(v[0-9]+\.[0-9]+\.)[0-9]+/\1$NEW_PATCH/"` | ||
git tag -a $NEW_TAG -m $NEW_TAG | ||
- name: Push changes | ||
if: steps.changes.outcome != 'success' | ||
run: | | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git push --follow-tags |